public function testProcessNotReturnsTrueTwiceWithinOneMinute() { $schedule = new Schedule(); $schedule->setExpression('* * * * *'); $schedule->setScheduledAt(new \DateTime('2010-01-01 00:00:00')); $this->factory->expects($this->any())->method('create')->with($schedule->getExpression())->will($this->returnValue($this->expression)); $this->expression->expects($this->any())->method('isDue')->will($this->returnValue(true)); $subject = new Processor(new ExpressionFactory()); $this->assertFalse($subject->process($schedule, new \DateTime('2010-01-01 00:00:00'))); }