public function testCanNotifyEventRegistrationToListeners() { $unitOfWork = $this->unitOfWorkMock(); $event = new EventStub(0); $this->listener1->expects($this->once())->method('onEventRegistration')->with($this->identicalTo($unitOfWork), $this->identicalTo($event))->will($this->returnArgument(1)); $this->listener2->expects($this->once())->method('onEventRegistration')->with($this->identicalTo($unitOfWork), $this->identicalTo($event))->will($this->returnArgument(1)); $this->assertSame($event, $this->listeners->onEventRegistration($unitOfWork, $event)); }
/** * @param Event $event * * @return Event * * @internal */ public function invokeEventRegistrationListeners(Event $event) { return $this->listeners->onEventRegistration($this, $event); }