protected function action() { $data = $this->jobRepository->getLatests($this->limit); foreach ($data as $key => $job) { $data[$key] = $job->getPreviewParseData(); unset($job); } return $data; }
public function cleanUp() { $this->jobRepository->cleanup('5 minute'); $latests = $this->jobRepository->getLatests(2); $this->assertTrue(is_array($latests)); $this->assertEquals(1, sizeof($latests)); $this->assertEquals(1, $latests[0]->id->getValue()); }