diff --git a/src/Codeception/Command/Clean.php b/src/Codeception/Command/Clean.php index cfe8f7a800..6adb10a9c2 100644 --- a/src/Codeception/Command/Clean.php +++ b/src/Codeception/Command/Clean.php @@ -32,11 +32,12 @@ protected function execute(InputInterface $input, OutputInterface $output) private function cleanProjectsRecursively(OutputInterface $output, $projectDir) { + $config = Configuration::config($projectDir); + $logDir = Configuration::logDir(); $output->writeln("Cleaning up output " . $logDir . "..."); FileSystem::doEmptyDir($logDir); - $config = Configuration::config($projectDir); $subProjects = $config['include']; foreach ($subProjects as $subProject) { $subProjectDir = $projectDir . $subProject; diff --git a/tests/cli/IncludedCest.php b/tests/cli/IncludedCest.php index 0f9fe51b08..2e790d0311 100644 --- a/tests/cli/IncludedCest.php +++ b/tests/cli/IncludedCest.php @@ -166,4 +166,21 @@ public function buildIncluded(\CliGuy $I) $I->seeInShellOutput('Jazz\\Pianist\\TestGuy'); $I->seeInShellOutput('Shire\\TestGuy'); } + + /** + * @before moveToIncluded + * @param CliGuy $I + */ + public function cleanIncluded(\CliGuy $I) + { + $ds = DIRECTORY_SEPARATOR; + + $I->executeCommand('clean'); + $I->seeInShellOutput("included{$ds}_log"); + $I->seeInShellOutput("included{$ds}jazz{$ds}tests/_log"); + $I->seeInShellOutput("included{$ds}jazz{$ds}pianist{$ds}tests/_log"); + $I->seeInShellOutput("included{$ds}shire{$ds}tests/_log"); + $I->seeInShellOutput('Done'); + } + }