sweetchuck/robo-phpunit

Robo task to run PHPUnit related commands

Installs: 97 779

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 2

Type:robo-tasks

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

This package is auto-updated.

Last update: 2024-11-06 17:39:55 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->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: