コード例 #1
0
 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));
 }
コード例 #2
0
 /**
  * @param Event $event
  *
  * @return Event
  *
  * @internal
  */
 public function invokeEventRegistrationListeners(Event $event)
 {
     return $this->listeners->onEventRegistration($this, $event);
 }