Skip to content

Commit

Permalink
refs #4121 renamed tests command to tests:run. Some other minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteur committed Oct 5, 2013
1 parent 5d5551d commit 429af6d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions plugins/CoreConsole/GenerateController.php
Expand Up @@ -37,6 +37,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

$this->writeSuccessMessage($output, array(
sprintf('Controller for %s generated.', $pluginName),
'You can now start adding Controller actions',
'Enjoy!'
));
}
Expand Down
10 changes: 6 additions & 4 deletions plugins/CoreConsole/RunTests.php
Expand Up @@ -24,19 +24,21 @@ class RunTests extends Command
{
protected function configure()
{
$this->setName('tests');
$this->setName('tests:run');
$this->setDescription('Run Piwik PHPUnit tests');
$this->addArgument('group', InputArgument::OPTIONAL, 'Optional test group', '');
$this->addArgument('group', InputArgument::OPTIONAL, 'Run only a specific test group. Separate multiple groups by comma, for instance core,integration', '');
$this->addOption('options', 'o', InputOption::VALUE_OPTIONAL, 'All options will be forwarded to phpunit', '');
}

protected function execute(InputInterface $input, OutputInterface $output)
{
$options = $input->getOption('options');
$group = $input->getArgument('group');
$group = $input->getArgument('group');

if (!empty($group)) {
$options = '--group ' . ucfirst($group) . ' ' . $options;
$groups = explode(',', $group);
$groups = array_map('ucfirst', $groups);
$options = '--group ' . implode(',', $groups) . ' ' . $options;
}

$cmd = sprintf('cd %s/tests/PHPUnit && phpunit %s', PIWIK_DOCUMENT_ROOT, $options);
Expand Down
1 change: 1 addition & 0 deletions plugins/CoreConsole/WatchLog.php
Expand Up @@ -25,6 +25,7 @@ class WatchLog extends Command
protected function configure()
{
$this->setName('log:watch');
$this->setDescription('Outputs the last parts of the log files and follows as the log file grows. Works not under Windows');
}

protected function execute(InputInterface $input, OutputInterface $output)
Expand Down

0 comments on commit 429af6d

Please sign in to comment.