diff --git a/tests/Utils/TaskSchedule/CronTest.php b/tests/Utils/TaskSchedule/CronTest.php index 8cf1b8078..0b71b6198 100644 --- a/tests/Utils/TaskSchedule/CronTest.php +++ b/tests/Utils/TaskSchedule/CronTest.php @@ -25,15 +25,16 @@ class CronTest extends \PHPUnit\Framework\TestCase public function testCRUD() { + self::assertTrue(Cron::guessBin()); + if (\stristr(PHP_OS, 'LINUX')) { - Cron::guessBin(); $cron = new Cron(); self::assertEquals([], $cron->getAllByName('testCronJob', false)); - + $job = new CronJob('testCronJob', 'testFile', '0 0 1 1 *'); $cron->create($job); - + self::assertTrue(!empty($cron->getAllByName('testCronJob', false))); if (!empty($cron->getAllByName('testCronJob', false))) { self::assertEquals('testFile', $cron->getAllByName('testCronJob', false)[0]->getCommand());