createMock(ImageLoader::class); $imageLoader->expects($this->once())->method('loadColorFromRebrickable')->with(-1); $imageLoader->expects($this->once())->method('loadMissingModelImages'); $application->add(new LoadImagesCommand(null,$imageLoader)); $command = $application->find('app:load:images'); $tester = new CommandTester($command); $tester->execute( [ '--rebrickable' => true, '--color' => -1, '--missing' => true ] ); } }