diff --git a/tests/Utils/TaskSchedule/CronTest.php b/tests/Utils/TaskSchedule/CronTest.php index c40f4c9b5..358b44c14 100755 --- a/tests/Utils/TaskSchedule/CronTest.php +++ b/tests/Utils/TaskSchedule/CronTest.php @@ -16,6 +16,7 @@ namespace phpOMS\tests\Utils\TaskSchedule; use phpOMS\Utils\TaskSchedule\Cron; use phpOMS\Utils\TaskSchedule\CronJob; +use phpOMS\Utils\TaskSchedule\SchedulerAbstract; /** * @testdox phpOMS\tests\Utils\TaskSchedule\CronTest: Cron handler @@ -31,6 +32,12 @@ final class CronTest extends \PHPUnit\Framework\TestCase 'The OS is not linux.' ); } + + if (!SchedulerAbstract::guessBin()) { + $this->markTestSkipped( + 'No scheduler available' + ); + } } // * * * * * echo "test" > __DIR__ . '/cronjob.log' // evaluate dir diff --git a/tests/Utils/TaskSchedule/TaskSchedulerTest.php b/tests/Utils/TaskSchedule/TaskSchedulerTest.php index b0cac3981..00f6c5531 100755 --- a/tests/Utils/TaskSchedule/TaskSchedulerTest.php +++ b/tests/Utils/TaskSchedule/TaskSchedulerTest.php @@ -15,6 +15,7 @@ declare(strict_types=1); namespace phpOMS\tests\Utils\TaskSchedule; use phpOMS\Utils\TaskSchedule\Schedule; +use phpOMS\Utils\TaskSchedule\SchedulerAbstract; use phpOMS\Utils\TaskSchedule\TaskScheduler; /** @@ -31,6 +32,12 @@ final class TaskSchedulerTest extends \PHPUnit\Framework\TestCase 'The OS is not windows.' ); } + + if (!SchedulerAbstract::guessBin()) { + $this->markTestSkipped( + 'No scheduler available' + ); + } } /**