Пример #1
0
 public function listQueuesAction()
 {
     $queueIds = $this->metro->listQueues();
     $responseContent = [];
     foreach ($queueIds as $queueId) {
         $queue = ['type' => 'queue', 'id' => $queueId];
         $this->addLinksIfPossible($queue, $queueId);
         $responseContent['data'][] = $queue;
     }
     return new JsonResponse($responseContent);
 }
Пример #2
0
 function it_exits_non_zero_if_nothing_is_found(MonitoredQueue $metro)
 {
     $metro->getJob('default')->willReturn(null);
     $metro->listQueues()->willReturn(['no luck']);
     $input = new ArrayInput(['id' => 'default']);
     $output = new BufferedOutput();
     $this->run($input, $output)->shouldNotReturn(0);
 }