Skip to content

Test events while process isolation #6291

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

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions tests/end-to-end/regression/5592-process-isolation-events.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
--TEST--
https://github.com/sebastianbergmann/phpunit/pull/5592
--FILE--
<?php declare(strict_types=1);
$_SERVER['argv'][] = '--do-not-cache-result';
$_SERVER['argv'][] = '--no-configuration';
$_SERVER['argv'][] = '--process-isolation';
$_SERVER['argv'][] = '--debug';
$_SERVER['argv'][] = __DIR__ . '/5592/Issue5592TestIsolation.php';

function global5592IsolationEventsExceptionHandler(Throwable $exception): void
{
}

set_exception_handler('global5592IsolationEventsExceptionHandler');

require_once __DIR__ . '/../../bootstrap.php';
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
--EXPECTF--
PHPUnit Started (PHPUnit %s using %s)
Test Runner Configured
Event Facade Sealed
Test Suite Loaded (6 tests)
Test Runner Started
Test Suite Sorted
Test Runner Execution Started (6 tests)
Test Suite Started (PHPUnit\TestFixture\Issue5592TestIsolation, 6 tests)
Child Process Started
Test Preparation Started (PHPUnit\TestFixture\Issue5592TestIsolation::testAddedAndRemovedErrorHandler)
Test Prepared (PHPUnit\TestFixture\Issue5592TestIsolation::testAddedAndRemovedErrorHandler)
Test Passed (PHPUnit\TestFixture\Issue5592TestIsolation::testAddedAndRemovedErrorHandler)
Test Finished (PHPUnit\TestFixture\Issue5592TestIsolation::testAddedAndRemovedErrorHandler)
Child Process Finished
Child Process Started
Test Preparation Started (PHPUnit\TestFixture\Issue5592TestIsolation::testAddedErrorHandler)
Test Prepared (PHPUnit\TestFixture\Issue5592TestIsolation::testAddedErrorHandler)
Test Failed (PHPUnit\TestFixture\Issue5592TestIsolation::testAddedErrorHandler)
Failed asserting that false is true.
Test Finished (PHPUnit\TestFixture\Issue5592TestIsolation::testAddedErrorHandler)
Child Process Finished
Child Process Started
Test Preparation Started (PHPUnit\TestFixture\Issue5592TestIsolation::testRemovedErrorHandler)
Test Prepared (PHPUnit\TestFixture\Issue5592TestIsolation::testRemovedErrorHandler)
Test Failed (PHPUnit\TestFixture\Issue5592TestIsolation::testRemovedErrorHandler)
Failed asserting that false is true.
Test Considered Risky (PHPUnit\TestFixture\Issue5592TestIsolation::testRemovedErrorHandler)
Test code or tested code removed error handlers other than its own
Test Finished (PHPUnit\TestFixture\Issue5592TestIsolation::testRemovedErrorHandler)
Child Process Finished
Child Process Started
Test Preparation Started (PHPUnit\TestFixture\Issue5592TestIsolation::testAddedAndRemovedExceptionHandler)
Test Prepared (PHPUnit\TestFixture\Issue5592TestIsolation::testAddedAndRemovedExceptionHandler)
Test Passed (PHPUnit\TestFixture\Issue5592TestIsolation::testAddedAndRemovedExceptionHandler)
Test Finished (PHPUnit\TestFixture\Issue5592TestIsolation::testAddedAndRemovedExceptionHandler)
Child Process Finished
Child Process Started
Test Preparation Started (PHPUnit\TestFixture\Issue5592TestIsolation::testAddedExceptionHandler)
Test Prepared (PHPUnit\TestFixture\Issue5592TestIsolation::testAddedExceptionHandler)
Test Failed (PHPUnit\TestFixture\Issue5592TestIsolation::testAddedExceptionHandler)
Failed asserting that false is true.
Test Finished (PHPUnit\TestFixture\Issue5592TestIsolation::testAddedExceptionHandler)
Child Process Finished
Child Process Started
Test Preparation Started (PHPUnit\TestFixture\Issue5592TestIsolation::testRemovedExceptionHandler)
Test Prepared (PHPUnit\TestFixture\Issue5592TestIsolation::testRemovedExceptionHandler)
Test Failed (PHPUnit\TestFixture\Issue5592TestIsolation::testRemovedExceptionHandler)
Failed asserting that false is true.
Test Finished (PHPUnit\TestFixture\Issue5592TestIsolation::testRemovedExceptionHandler)
Child Process Finished
Test Suite Finished (PHPUnit\TestFixture\Issue5592TestIsolation, 6 tests)
Test Runner Execution Finished
Test Runner Finished
PHPUnit Finished (Shell Exit Code: 1)
Loading