public function testGetGate() { if (is_null($this->bus->getGate())) { $this->bus->setGate(new Gate()); } $this->assertInstanceOf('Malocher\\Cqrs\\Gate', $this->bus->getGate()); }
/** * @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); }