/** * @group cronCompile */ public function testLowLevelMethods() { $e = new Event($this->id, 'php foo'); $this->assertEquals('30 1 11 4 * *', $e->on('01:30 11-04-2016')->getExpression()); $e = new Event($this->id, 'php bar'); $this->assertEquals('45 13 * * * *', $e->on('13:45')->getExpression()); $e = new Event($this->id, 'php foo'); $this->assertEquals('45 13 * * * *', $e->at('13:45')->getExpression()); $e = new Event($this->id, 'php bar'); $e->minute([12, 24, 35])->hour('1-5', 4, 8)->dayOfMonth(1, 6, 12, 19, 25)->month('1-8')->dayOfWeek('mon,wed,thu'); $this->assertEquals('12,24,35 1-5,4,8 1,6,12,19,25 1-8 mon,wed,thu *', $e->getExpression()); $e = new Event($this->id, 'php foo'); $this->assertEquals('45 13 * * * *', $e->cron('45 13 * * * *')->getExpression()); $e = new Event($this->id, 'php foo'); $this->assertTrue($e->isDue()); }