function SimpletestPhpunitRunCommandTest::provideStatusCodes

Data provider for testSimpletestPhpUnitRunCommand().

Return value

array Arrays of status codes and the label they're expected to have.

File

core/modules/simpletest/tests/src/Unit/SimpletestPhpunitRunCommandTest.php, line 85

Class

SimpletestPhpunitRunCommandTest
Tests simpletest_run_phpunit_tests() handles PHPunit fatals correctly.

Namespace

Drupal\Tests\simpletest\Unit

Code

public function provideStatusCodes() {
    $data = [
        [
            0,
            'pass',
        ],
        [
            1,
            'fail',
        ],
        [
            2,
            'exception',
        ],
    ];
    // All status codes 3 and above should be labeled 'error'.
    // @todo: The valid values here would be 3 to 127. But since the test
    // touches the file system a lot, we only have 3, 4, and 127 for speed.
    foreach ([
        3,
        4,
        127,
    ] as $status) {
        $data[] = [
            $status,
            'error',
        ];
    }
    return $data;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.