Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process Isolation does not work when PHPUnit is used as PHAR #3394

Closed
bugreportuser opened this issue Nov 8, 2018 · 1 comment
Closed

Process Isolation does not work when PHPUnit is used as PHAR #3394

bugreportuser opened this issue Nov 8, 2018 · 1 comment
Assignees
Labels
type/bug Something is broken

Comments

@bugreportuser
Copy link

bugreportuser commented Nov 8, 2018

Q A
PHPUnit version 7.4.3
PHP version 7.2.10
Installation Method PHAR

This is related to #3367 and #3306.

When --process-isolation is added, no assertions run using the PHAR. If composer is used, the output is correct with or without process isolation.

Class isolation has the same output because of #3258.

FailTest.php:

<?php
class FailTest extends PHPUnit\Framework\TestCase {
    public function testFail () {
        $this->assertTrue(false);
    }
}

No process isolation:

$ ./phpunit FailTest.php
PHPUnit 7.4.3 by Sebastian Bergmann and contributors.

F                                                                   1 / 1 (100%)

Time: 52 ms, Memory: 10.00MB

There was 1 failure:

1) FailTest::testFail
Failed asserting that false is true.

/home/.../phpunit/FailTest.php:4

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.

Process isolation:

$ ./phpunit FailTest.php --process-isolation
PHPUnit 7.4.3 by Sebastian Bergmann and contributors.

.                                                                   1 / 1 (100%)

Time: 123 ms, Memory: 10.00MB

OK (1 test, 0 assertions)
@sebastianbergmann sebastianbergmann added the type/bug Something is broken label Nov 8, 2018
@sebastianbergmann sebastianbergmann changed the title No assertions run with process isolation Assertions do not fail in process isolation when PHPUnit is used as PHAR Nov 8, 2018
@sebastianbergmann
Copy link
Owner

I was able to reproduce the issue.

@sebastianbergmann sebastianbergmann changed the title Assertions do not fail in process isolation when PHPUnit is used as PHAR Process Isolation does not work when PHPUnit is used as PHAR Nov 8, 2018
@sebastianbergmann sebastianbergmann self-assigned this Nov 8, 2018
marcospassos pushed a commit to marcospassos/phpunit that referenced this issue Nov 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something is broken
Projects
None yet
Development

No branches or pull requests

2 participants