public function ensureNoDevWarningOnSelfUpdate($command) { $application = new Application(); $application->add(new SelfUpdateCommand()); $inputMock = $this->getMock('Symfony\\Component\\Console\\Input\\InputInterface'); $outputMock = $this->getMock('Symfony\\Component\\Console\\Output\\OutputInterface'); $inputMock->expects($this->once())->method('getFirstArgument')->will($this->returnValue($command)); $outputMock->expects($this->never())->method("writeln"); if (!defined('APP_DEV_WARNING_TIME')) { define('APP_DEV_WARNING_TIME', time() - 1); } $application->doRun($inputMock, $outputMock); }