/** * @covers DmMailer\Repository\QueueItem */ public function testFixSuspiciousQueue() { $suspiciousQueue = $this->sut->getSuspiciousQueue(); $suspiciousCount = count($suspiciousQueue); $actualResult = $this->sut->fixSuspiciousQueue($suspiciousQueue); $this->assertEquals($suspiciousCount, $actualResult); }
/** * @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 ''; }