public function testCronConditions() { $e = new Event($this->id, 'php foo'); $this->assertFalse($e->cron('* * * * * *')->when(function () { return false; })->isDue()); $e = new Event($this->id, 'php foo'); $this->assertTrue($e->cron('* * * * * *')->when(function () { return true; })->isDue()); $e = new Event($this->id, 'php foo'); $this->assertFalse($e->cron('* * * * * *')->skip(function () { return true; })->isDue()); $e = new Event($this->id, 'php foo'); $this->assertTrue($e->cron('* * * * * *')->skip(function () { return false; })->isDue()); }