public function testDemoApplicationInstallation()
{
if (PHP_VERSION_ID < 50500) {
$this->markTestSkipped('Symfony 3 requires PHP 5.5.9 or higher.');
}
$projectDir = sprintf('%s/my_test_project', sys_get_temp_dir());
$this->fs->remove($projectDir);
$output = $this->runCommand(sprintf('php symfony.phar demo %s', ProcessUtils::escapeArgument($projectDir)));
$this->assertContains('Downloading the Symfony Demo Application', $output);
$this->assertContains('Symfony Demo Application was successfully installed.', $output);
$output = $this->runCommand('php bin/console --version', $projectDir);
$this->assertRegExp('/Symfony version 3\\.\\d+\\.\\d+(-DEV)? - app\\/dev\\/debug/', $output);
$composerConfig = json_decode(file_get_contents($projectDir . '/composer.json'), true);
$this->assertArrayNotHasKey('platform', $composerConfig['config'], 'The composer.json file does not define any platform configuration.');
}