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