private function getJQManagedJobForDbJob($dbJob) { $mJob = new JQManagedJob($this); $mJob->fromArray($dbJob->toArray(BasePeer::TYPE_STUDLYPHPNAME)); return $mJob; }
/** * @dataProvider jobIsPastMaxRuntimeSecondsDataProvider * @testdox JQManagedJob::isPastMaxRuntimeSeconds() */ function testJobIsPastMaxRuntimeSeconds($maxRuntimeSeconds, $currentStatus, $startDts, $expectedResult) { $q = $this->jqStore; $mJob = new JQManagedJob($q); $mJob->fromArray(array('status' => $currentStatus, 'maxRuntimeSeconds' => $maxRuntimeSeconds, 'startDts' => new DateTime($startDts))); $this->assertEquals($expectedResult, $mJob->isPastMaxRuntimeSeconds()); }