Пример #1
0
 protected function preparePluginManager()
 {
     if ($this->controller->getPluginManager() instanceof \PHPUnit_Framework_MockObject_MockObject) {
         return $this->controller->getPluginManager();
     }
     $pluginManager = $this->getMock('Zend\\Mvc\\Controller\\PluginManager');
     $this->controller->setPluginManager($pluginManager);
     return $pluginManager;
 }
Пример #2
0
 public function setPluginManager(PluginManager $plugin)
 {
     parent::setPluginManager($plugin);
     $this->getEventManager()->attach(MvcEvent::EVENT_DISPATCH, array($this, "onInit"), 100);
 }