Example #1
0
 public function it_should_give_queue_context(Queue $a, Queue $b, Context $contextA, Context $contextB)
 {
     $a->getName()->willReturn('a');
     $b->getName()->willReturn('b');
     $a->getFingerPrint()->shouldBeCalled()->willReturn('a');
     $b->getFingerPrint()->shouldBeCalled()->willReturn('b');
     $a->getContext()->willReturn($contextA);
     $b->getContext()->willReturn($contextB);
     $this->addQueue($a);
     $this->addQueue($b);
     $this->getQueueContext('a')->shouldReturn($contextA);
 }
Example #2
0
 /**
  * @param Queue $queue
  */
 public function addQueue(Queue $queue)
 {
     $this->queues[$queue->getFingerPrint()] = $queue;
 }