/** * @dataProvider isValidForProvider * @param int $time * @param string $expression * @param bool $expectedResult */ public function testIsValidFor($time, $expression, $expectedResult) { $eventMock = $this->getMock('Magento\\Framework\\Event', [], [], '', false); $this->cron->setCronExpr($expression); $this->cron->setNow($time); $this->assertEquals($expectedResult, $this->cron->isValidFor($eventMock)); }