Пример #1
0
 /**
  * Test registerPerformAppFunction and emit
  * @TODO Test for registering an object which does not exist; currently this causes a PHP fatal error
  */
 public function testRegisterPerformAppFunction()
 {
     //register first, should work
     $test_ph = new TestFauxHookableApp();
     $test_ph->registerPerformAppFunction('TestFauxPlugin');
     $test_ph->performAppFunction();
     //register an object without the right method
     $test_ph->registerPerformAppFunction('TestFauxPluginOne');
     $this->expectException(new Exception("The TestFauxPluginOne object does not have a performAppFunction function."));
     $test_ph->performAppFunction();
 }