composer require --dev sweetchuck/robo-phpunit
<?php
class RoboFile extends \Robo\Tasks
{
use \Sweetchuck\Robo\PHPUnit\PHPUnitTaskLoader;
/**
* @command phpunit:list-groups
*/
public function cmdListGroups()
{
return $this
->collectionBuilder()
->addTask($this->taskPHPUnitListGroups())
->addCode(function (\Robo\State\Data $data): int {
$output = $this->output();
foreach ($data['phpunit.groupNames'] as $groupName) {
$output->writeln($groupName);
}
return 0;
});
}
}
Run vendor/bin/robo phpunit:list-groups
Example output:
foo bar
<?php
class RoboFile extends \Robo\Tasks
{
use \Sweetchuck\Robo\PHPUnit\PHPUnitTaskLoader;
}
Run vendor/bin/robo phpunit:
Example output:
<?php
class RoboFile extends \Robo\Tasks
{
use \Sweetchuck\Robo\PHPUnit\PHPUnitTaskLoader;
}
Run vendor/bin/robo phpunit:
Example output:
<?php
class RoboFile extends \Robo\Tasks
{
use \Sweetchuck\Robo\PHPUnit\PHPUnitTaskLoader;
}
Run vendor/bin/robo phpunit:
Example output:
<?php
class RoboFile extends \Robo\Tasks
{
use \Sweetchuck\Robo\PHPUnit\PHPUnitTaskLoader;
}
Run vendor/bin/robo phpunit:
Example output: