11 use PhpAmqpLib\Channel\AMQPChannel;
18 $bindingInstaller = $this->createMock(BindingInstallerInterface::class);
20 $channel = $this->createMock(AMQPChannel::class);
22 $binding = $this->createMock(BindingInterface::class);
24 $exchange = $this->createMock(ExchangeConfigItemInterface::class);
25 $exchange->expects($this->exactly(2))->method(
'getName')->willReturn(
'magento');
26 $exchange->expects($this->once())->method(
'getType')->willReturn(
'topic');
27 $exchange->expects($this->once())->method(
'isDurable')->willReturn(
true);
28 $exchange->expects($this->once())->method(
'isAutoDelete')->willReturn(
false);
29 $exchange->expects($this->once())->method(
'isInternal')->willReturn(
false);
30 $exchange->expects($this->once())->method(
'getArguments')->willReturn([
'some' =>
'value']);
31 $exchange->expects($this->once())->method(
'getBindings')->willReturn([
'bind01' => $binding]);
33 $channel->expects($this->once())
34 ->method(
'exchange_declare')
35 ->with(
'magento',
'topic',
false,
true,
false,
false,
false, [
'some' => [
'S',
'value']],
null);
36 $bindingInstaller->expects($this->once())->method(
'install')->with($channel, $binding,
'magento');
37 $model->install($channel, $exchange);