Пример #1
0
 public function testGetScheduledCommands()
 {
     $scheduledCommands = [$class = m::mock('Indatus\\Dispatcher\\Scheduling\\ScheduledCommand', function ($m) {
         $m->shouldReceive('schedule')->andReturn(m::mock('Indatus\\Dispatcher\\Scheduling\\Schedulable'));
     })];
     $this->console->shouldReceive('all')->once()->andReturn($scheduledCommands);
     $this->assertSameSize($scheduledCommands, $this->scheduleService->getScheduledCommands());
 }
Пример #2
0
 public function testIsDue()
 {
     $this->interpreter->shouldReceive('isDue')->andReturn(true);
     $this->assertTrue($this->scheduleService->isDue($this->scheduler));
 }