Files
FOSSBilling/tests-legacy/library/Box/Box_EventManagerTest.php
T
Belle Aerni 0a156f4161 Fix CS automation (#3209)
* Restore needed gitignore

* Ran the fixes since they are far behind

* Fix for rector causing a problem. Re-ran.

* Update ServiceTest.php
2026-01-26 11:18:35 -08:00

32 lines
741 B
PHP

<?php
declare(strict_types=1);
#[Group('Core')]
final class Box_EventManagerTest extends BBTestCase
{
#[PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
public function testEmptyFire(): void
{
$manager = new Box_EventManager();
$manager->fire([]);
}
public function testFire(): void
{
$db_mock = $this->createMock('Box_Database');
$db_mock->expects($this->atLeastOnce())
->method('getAll')
->willReturn([]);
$di = $this->getDi();
$di['logger'] = new Box_Log();
$di['db'] = $db_mock;
$manager = new Box_EventManager();
$manager->setDi($di);
$manager->fire(['event' => 'onBeforeClientSignup']);
}
}