Exemplo n.º 1
0
 public function testInvokeNonMappedEvent()
 {
     $this->bus->setGate(new Gate());
     $mockEvent = new MockEvent();
     $this->assertFalse($this->bus->publishEvent($mockEvent));
 }
Exemplo n.º 2
0
 /**
  * @param null $name
  * @return AbstractBus|\Malocher\Cqrs\Bus\BusInterface
  */
 public function getBus($name = null)
 {
     return is_null($name) ? $this->bus : $this->bus->getGate()->getBus($name);
 }