public function testGetLogs() { $job = new Job(); $job->setTicket('ticket'); $this->jobManager->expects($this->once())->method('findByTicket')->with($job->getTicket())->willReturn($job); $this->logManager->expects($this->once())->method('findByJob')->with($job)->willReturn('logs'); $this->assertSame('logs', $this->subject->getLogs($job->getTicket())); }
/** * {@inheritdoc} */ public function getLogs($ticket) { $this->logger->debug('Get logs of job ' . $ticket); return $this->logManager->findByJob($this->findJob($ticket)); }