protected function setUp() { $this->connection = $this->createMock(ConnectionInterface::class); $this->channel = $this->createMock(ChannelInterface::class); $this->connection->expects($this->any())->method('channel')->willReturn($this->channel); $this->invoker = new Invoker($this->connection); }
protected function setUp() { $this->connection = $this->createMock(ConnectionInterface::class); $this->channel = $this->createMock(ChannelInterface::class); $this->invoker = $this->createMock(Invoker::class); $this->exchange = 'whatever'; $this->driver = new Driver($this->connection, $this->exchange, new JsonEncoder(), $this->invoker); $this->connection->expects($this->any())->method('channel')->willReturn($this->channel); }