Robo task to run PHPUnit related tasks

CircleCI codecov

Install

composer require --dev sweetchuck/robo-phpunit

Task - taskPHPUnitListGroupsTask

<?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

Task - taskPHPUnitListSuitesTask

<?php

class RoboFile extends \Robo\Tasks
{
    use \Sweetchuck\Robo\PHPUnit\PHPUnitTaskLoader;
}

Run vendor/bin/robo phpunit:
Example output:


Task - taskPHPUnitListTestsTask

<?php

class RoboFile extends \Robo\Tasks
{
    use \Sweetchuck\Robo\PHPUnit\PHPUnitTaskLoader;
}

Run vendor/bin/robo phpunit:
Example output:


Task - taskPHPUnitParseXml

<?php

class RoboFile extends \Robo\Tasks
{
    use \Sweetchuck\Robo\PHPUnit\PHPUnitTaskLoader;
}

Run vendor/bin/robo phpunit:
Example output:


Task - taskPHPUnitRun

<?php

class RoboFile extends \Robo\Tasks
{
    use \Sweetchuck\Robo\PHPUnit\PHPUnitTaskLoader;
}

Run vendor/bin/robo phpunit:
Example output: