Ejemplo n.º 1
0
 public function testRegisterABeforeSystemProvider()
 {
     $stub = $this->getMock('\\pff\\Iface\\IBeforeSystemHook');
     $stub->expects($this->any())->method('doBeforeSystem')->will($this->returnValue('done'));
     $this->object->registerHook($stub, 'name');
     $listOfHooks = $this->object->getBeforeSystem();
     $this->assertNotEmpty($listOfHooks);
     $this->assertEquals('done', $listOfHooks['name']->doBeforeSystem());
 }