public function testGetSetEvent() { $defaultEvent = $this->queue->getEvent(); $this->assertInstanceOf(QueueEvent::class, $defaultEvent); $newEvent = new Event(); $newEvent->setParam('foo', 'bar'); $this->assertInstanceOf(Queue::class, $this->queue->setEvent($newEvent)); //Test recast $this->assertInstanceOf(QueueEvent::class, $this->queue->getEvent()); $this->assertSame('bar', $this->queue->getEvent()->getParam('foo')); //Restore original event $this->queue->setEvent($defaultEvent); }