コード例 #1
0
ファイル: QueueItemTest.php プロジェクト: peteraba/dm-mailer
 /**
  * @covers DmMailer\Repository\QueueItem
  */
 public function testFixSuspiciousQueue()
 {
     $suspiciousQueue = $this->sut->getSuspiciousQueue();
     $suspiciousCount = count($suspiciousQueue);
     $actualResult = $this->sut->fixSuspiciousQueue($suspiciousQueue);
     $this->assertEquals($suspiciousCount, $actualResult);
 }
コード例 #2
0
 /**
  * @return string
  */
 public function cleanUpAction()
 {
     $readyQueue = $this->queueItemRepository->getSuspiciousQueue();
     if ($this->isVerbose()) {
         if (empty($readyQueue)) {
             $this->logger->info('Nothing to fix.');
         } else {
             foreach ($readyQueue as $queueItem) {
                 $this->logger->info('Fixing queue item: ' . $this->queueItemToString($queueItem));
             }
         }
     }
     $this->queueItemRepository->fixSuspiciousQueue($readyQueue);
     return '';
 }