public function testGetScheduledCommands() { $scheduledCommands = array($class = m::mock('Indatus\\Dispatcher\\Scheduling\\ScheduledCommand', function ($m) { $m->shouldReceive('schedule')->andReturn(m::mock('Indatus\\Dispatcher\\Scheduling\\Schedulable')); })); Artisan::shouldReceive('all')->once()->andReturn($scheduledCommands); $this->assertSameSize($scheduledCommands, $this->scheduleService->getScheduledCommands()); }