mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-09 13:36:07 +09:00
32 lines
700 B
PHP
32 lines
700 B
PHP
<?php
|
|
/**
|
|
* @group Core
|
|
*/
|
|
class Box_EventsManagerTest extends PHPUnit_Framework_TestCase
|
|
{
|
|
|
|
public function testEmptyFire()
|
|
{
|
|
$manager = new Box_EventManager();
|
|
$manager->fire(array());
|
|
}
|
|
|
|
public function testFire()
|
|
{
|
|
$db_mock = $this->getMockBuilder('Box_Database')->getMock();
|
|
$db_mock->expects($this->atLeastOnce())
|
|
->method('getAll')
|
|
->will($this->returnValue(array()));
|
|
|
|
|
|
$di = new Box_Di();
|
|
$di['logger'] = new Box_Log();
|
|
$di['db'] = $db_mock;
|
|
|
|
|
|
$manager = new Box_EventManager();
|
|
$manager->setDi($di);
|
|
|
|
$manager->fire(array('event'=>'onBeforeClientSignup'));
|
|
}
|
|
} |