sweetchuck/robo-phpunit

Robo task to run PHPUnit related commands

Installs: 70 786

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:robo-tasks

v0.1.3 2020-01-02 11:22 UTC

This package is auto-updated.

Last update: 2022-01-18 22:23:13 UTC


README

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->taskPHPUnitListGroupsTask())
            ->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: