mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-05 22:54:33 +09:00
* Restore needed gitignore * Ran the fixes since they are far behind * Fix for rector causing a problem. Re-ran. * Update ServiceTest.php
32 lines
741 B
PHP
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']);
|
|
}
|
|
}
|