示例#1
0
 public function testQueueIsEventManagerAware()
 {
     $this->assertInstanceOf(EventManagerAwareInterface::class, $this->queue);
     $defaultEventManager = $this->queue->getEventManager();
     $this->assertInstanceOf(EventManagerInterface::class, $defaultEventManager);
     $newEventManager = new EventManager();
     $this->assertInstanceOf(Queue::class, $this->queue->setEventManager($newEventManager));
     $this->assertSame($newEventManager, $this->queue->getEventManager());
     //Restore original manager
     $this->queue->setEventManager($defaultEventManager);
 }