getMockBuilder('Alchemy\Phrasea\TaskManager\TaskManagerStatus') ->disableOriginalConstructor() ->getMock(); self::$DI['cli']['task-manager.status']->expects($this->once()) ->method('stop'); $input = $this->getMock('Symfony\Component\Console\Input\InputInterface'); $output = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); $command = new SchedulerStop(); $command->setContainer(self::$DI['cli']); $command->execute($input, $output); } }