public function testPluginWithoutEventAwareControllerRaisesDomainException() { $controller = new UneventfulController(); $plugin = new ForwardPlugin($this->controllers); $plugin->setController($controller); $this->setExpectedException('Zend\\Mvc\\Exception\\DomainException', 'InjectApplicationEventInterface'); $plugin->dispatch('forward'); }
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'); }