Ejemplo n.º 1
0
 public static function setEventCollection(EventManagerInterface $events = null)
 {
     parent::setEventCollection($events);
     $sharedManager = StaticEventManager::getInstance();
     static::$events->setSharedManager($sharedManager);
     static::$events->setIdentifiers(array(__CLASS__, get_called_class(), 'dots'));
 }
Ejemplo n.º 2
0
 public function testPassingNullValueForEventCollectionResetsInstance()
 {
     $events = GlobalEventManager::getEventCollection();
     $this->assertInstanceOf('Zend\\EventManager\\EventManager', $events);
     GlobalEventManager::setEventCollection(null);
     $events2 = GlobalEventManager::getEventCollection();
     $this->assertInstanceOf('Zend\\EventManager\\EventManager', $events2);
     $this->assertNotSame($events, $events2);
 }