コード例 #1
0
ファイル: ForwardTest.php プロジェクト: rajanlamic/IntTest
 public function testPluginWithoutEventAwareControllerRaisesDomainException()
 {
     $controller = new UneventfulController();
     $plugin = new ForwardPlugin($this->controllers);
     $plugin->setController($controller);
     $this->setExpectedException('Zend\\Mvc\\Exception\\DomainException', 'InjectApplicationEventInterface');
     $plugin->dispatch('forward');
 }
コード例 #2
0
 public function testPluginWithoutLocatorAwareControllerRaisesDomainException()
 {
     $controller = new UnlocatableEventfulController();
     $controller->setEvent($this->controller->getEvent());
     $plugin     = new ForwardPlugin();
     $plugin->setController($controller);
     $this->setExpectedException('Zend\Mvc\Exception\DomainException', 'implements ServiceLocatorAwareInterface');
     $plugin->dispatch('forward');
 }