getMock('Symfony\Component\Console\Input\InputInterface'); $output = $this->getMock('Symfony\Component\Console\Output\OutputInterface'); $input->expects($this->any()) ->method('getArgument') ->with('task_id') ->will($this->returnValue(1)); $command = new TaskStop(); $command->setContainer(self::$DI['cli']); $command->execute($input, $output); } }