Beispiel #1
0
 /**
  * @inheritdoc
  */
 public function createQueue(ChannelInterface $channel, $name = null, $flags = null, array $args = [])
 {
     $delegate = new \AMQPQueue($channel->getDelegate());
     $delegate->setFlags(Queue::convertToDelegateFlags($flags));
     $delegate->setArguments($args);
     if (null !== $name) {
         $delegate->setName($name);
     }
     return new Queue($delegate, $channel);
 }
Beispiel #2
0
 /**
  * @test
  */
 public function flags_are_converted()
 {
     foreach ($this->getFlags() as $flag) {
         $this->assertSame($flag, Queue::convertFromDelegateFlags(Queue::convertToDelegateFlags($flag)));
     }
 }