Exemple #1
0
 public function testCreateExchange()
 {
     $exchangeOptions = $this->prophesize(ExchangeOptions::class);
     $exchangePrototype = $this->prophesize(Exchange::class);
     $exchangePrototype->setChannel(Argument::type(Channel::class))->shouldBeCalled();
     $exchangePrototype->setOptions($exchangeOptions->reveal())->shouldBeCalled();
     $channel = new Channel($exchangePrototype->reveal());
     $exchange = $channel->createExchange($exchangeOptions->reveal());
     static::assertInstanceOf(Exchange::class, $exchange);
 }