コード例 #1
0
ファイル: QueueTest.php プロジェクト: stakhanovist/queue
 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);
 }