From 94eb099fb9baada7df5811df290633793e9ddd7f Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 11 Aug 2018 15:10:05 +0200 Subject: [PATCH] Check correct cron/schedule path --- tests/Utils/TaskSchedule/CronTest.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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());