|
| 1 | +--TEST-- |
| 2 | +The right events are emitted in the right order for a successful test that is run in an isolated process |
| 3 | +--SKIPIF-- |
| 4 | +<?php declare(strict_types=1); |
| 5 | +if (DIRECTORY_SEPARATOR === '\\') { |
| 6 | + print "skip: this test does not work on Windows / GitHub Actions\n"; |
| 7 | +} |
| 8 | +--FILE-- |
| 9 | +<?php declare(strict_types=1); |
| 10 | +$traceFile = tempnam(sys_get_temp_dir(), __FILE__); |
| 11 | + |
| 12 | +$_SERVER['argv'][] = '--do-not-cache-result'; |
| 13 | +$_SERVER['argv'][] = '--no-configuration'; |
| 14 | +$_SERVER['argv'][] = '--no-output'; |
| 15 | +$_SERVER['argv'][] = '--process-isolation'; |
| 16 | +$_SERVER['argv'][] = '--log-events-text'; |
| 17 | +$_SERVER['argv'][] = $traceFile; |
| 18 | +$_SERVER['argv'][] = __DIR__ . '/_files/SuccessTest.php'; |
| 19 | + |
| 20 | +require __DIR__ . '/../../bootstrap.php'; |
| 21 | + |
| 22 | +(new PHPUnit\TextUI\Application)->run($_SERVER['argv']); |
| 23 | + |
| 24 | +print file_get_contents($traceFile); |
| 25 | + |
| 26 | +unlink($traceFile); |
| 27 | +--EXPECTF-- |
| 28 | +PHPUnit Started (PHPUnit %s using %s) |
| 29 | +Test Runner Configured |
| 30 | +Test Suite Loaded (1 test) |
| 31 | +Event Facade Sealed |
| 32 | +Test Runner Started |
| 33 | +Test Suite Sorted |
| 34 | +Test Runner Execution Started (1 test) |
| 35 | +Test Suite Started (PHPUnit\TestFixture\Event\SuccessTest, 1 test) |
| 36 | +Test Preparation Started (PHPUnit\TestFixture\Event\SuccessTest::testSuccess) |
| 37 | +Test Prepared (PHPUnit\TestFixture\Event\SuccessTest::testSuccess) |
| 38 | +Assertion Succeeded (Constraint: is true) |
| 39 | +Test Passed (PHPUnit\TestFixture\Event\SuccessTest::testSuccess) |
| 40 | +Test Finished (PHPUnit\TestFixture\Event\SuccessTest::testSuccess) |
| 41 | +Test Suite Finished (PHPUnit\TestFixture\Event\SuccessTest, 1 test) |
| 42 | +Test Runner Execution Finished |
| 43 | +Test Runner Finished |
| 44 | +PHPUnit Finished (Shell Exit Code: 0) |
0 commit comments