示例#1
0
 public function testGetGate()
 {
     if (is_null($this->bus->getGate())) {
         $this->bus->setGate(new Gate());
     }
     $this->assertInstanceOf('Malocher\\Cqrs\\Gate', $this->bus->getGate());
 }
示例#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);
 }