/** * @{inheritdoc} */ protected function executeCommandByProject($projectName, ProjectConfiguration $projectConfig, OutputInterface $output) { $this->getApplication()->executeCommand('project:symfony:cache:clear', ['--project-name' => $projectName, '--symfony-env' => ['test']], $output); $buildReportHtmlPath = !empty($this->remoteBuildDir) ? '--testdox-html ' . $this->remoteBuildDir . '/tests/integration.html' : null; $this->getSshExec()->exec(strtr('phpunit --configuration %remote_phpunit_configuration_xml_path% --colors %build_report_html% ' . ($output->isDebug() ? ' --verbose --debug' : ''), ['%project_dir%' => $projectConfig->getRemoteWebappDir(), '%remote_phpunit_configuration_xml_path%' => $projectConfig->getRemotePhpunitConfigurationXmlPath(), '%build_report_html%' => $buildReportHtmlPath])); if ($this->displayStatusText) { $output->writeln(sprintf('<comment>Executes integration tests for project "<info>%s</info>"</comment>: %s', $projectName, $this->getSshExec()->getLastReturnStatus() == 0 ? ' <info>SUCCESS</info>' : ' <error>ERROR</error>')); } return $this->getSshExec()->getLastReturnStatus(); }