forked from Codeception/Codeception
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathClean.php
More file actions
32 lines (28 loc) · 799 Bytes
/
Copy pathClean.php
File metadata and controls
32 lines (28 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
namespace Codeception\Command;
use Codeception\Configuration;
use Codeception\Util\FileSystem;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
/**
* Cleans `output` directory
*
* * `codecept clean`
* * `codecept clean -c path/to/project`
*
*/
class Clean extends Command
{
use Shared\Config;
public function getDescription()
{
return 'Cleans or creates _output directory';
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$output->writeln("<info>Cleaning up " . Configuration::outputDir() . "...</info>");
FileSystem::doEmptyDir(Configuration::outputDir());
$output->writeln("Done");
}
}