Skip to content

Tests with exit code 1 do not register as failure #20

Description

@ngstylez

When all phpunit commands are finnished the execution will end. The exit status is 0 if all phphunit commands return 0 otherwice it is 1.

If there is a test execution that results with exit(1);, the return code is not registered as a test failure by parallel-phpunit.

<?php
class exitTest
{
    public function test_exitDuringTest() {
        echo 'about to exit...';
        exit(1);
    }
}

Output:

$ parallel-phpunit --pu-verbose .
Running parallel-phpunit 1.3.0
Starting command: /usr/local/bin/phpunit -d parallel-phpunit-thread=0 ./exitTest.php
Command ended: /usr/local/bin/phpunit -d parallel-phpunit-thread=0 ./exitTest.php
PHPUnit 4.2.4 by Sebastian Bergmann.

Configuration read from /tests/phpunit.xml

about to exit...Success: 0 Fail: 0 Error: 0 Skip: 0 Incomplete: 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions