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); }
/** * @param Queue $queue */ public function addQueue(Queue $queue) { $this->queues[$queue->getFingerPrint()] = $queue; }