|
| 1 | +--TEST-- |
| 2 | +phpunit --configuration=order-by-duration.phpunit.xml |
| 3 | +--FILE-- |
| 4 | +<?php declare(strict_types=1); |
| 5 | +$cacheDirectory = sys_get_temp_dir() . DIRECTORY_SEPARATOR . sha1(__FILE__); |
| 6 | + |
| 7 | +if (is_dir($cacheDirectory)) { |
| 8 | + rmdir($cacheDirectory); |
| 9 | +} |
| 10 | + |
| 11 | +mkdir($cacheDirectory); |
| 12 | + |
| 13 | +copy(__DIR__ . '/_files/TestWithDifferentDurations.phpunit.result.cache.txt', $cacheDirectory . DIRECTORY_SEPARATOR . 'test-results'); |
| 14 | + |
| 15 | +$_SERVER['argv'][] = '--do-not-cache-result'; |
| 16 | +$_SERVER['argv'][] = '--configuration=' . __DIR__ . '/_files/order-by-duration.phpunit.xml'; |
| 17 | +$_SERVER['argv'][] = '--debug'; |
| 18 | +$_SERVER['argv'][] = '--cache-result'; |
| 19 | +$_SERVER['argv'][] = '--cache-directory=' . $cacheDirectory; |
| 20 | + |
| 21 | +require_once __DIR__ . '/../../bootstrap.php'; |
| 22 | + |
| 23 | +(new PHPUnit\TextUI\Application)->run($_SERVER['argv']); |
| 24 | + |
| 25 | +unlink($cacheDirectory . DIRECTORY_SEPARATOR . 'test-results'); |
| 26 | +rmdir($cacheDirectory); |
| 27 | +--EXPECTF-- |
| 28 | +PHPUnit Started (PHPUnit %s using PHP %s) |
| 29 | +Test Runner Configured |
| 30 | +Event Facade Sealed |
| 31 | +Test Suite Loaded (3 tests) |
| 32 | +Test Runner Started |
| 33 | +Test Suite Sorted |
| 34 | +Test Runner Execution Started (3 tests) |
| 35 | +Test Suite Started (%sorder-by-duration.phpunit.xml, 3 tests) |
| 36 | +Test Suite Started (order-by-duration, 3 tests) |
| 37 | +Test Suite Started (PHPUnit\TestFixture\TestWithDifferentDurations, 3 tests) |
| 38 | +Test Preparation Started (PHPUnit\TestFixture\TestWithDifferentDurations::testTwo) |
| 39 | +Test Prepared (PHPUnit\TestFixture\TestWithDifferentDurations::testTwo) |
| 40 | +Test Passed (PHPUnit\TestFixture\TestWithDifferentDurations::testTwo) |
| 41 | +Test Finished (PHPUnit\TestFixture\TestWithDifferentDurations::testTwo) |
| 42 | +Test Preparation Started (PHPUnit\TestFixture\TestWithDifferentDurations::testOne) |
| 43 | +Test Prepared (PHPUnit\TestFixture\TestWithDifferentDurations::testOne) |
| 44 | +Test Passed (PHPUnit\TestFixture\TestWithDifferentDurations::testOne) |
| 45 | +Test Finished (PHPUnit\TestFixture\TestWithDifferentDurations::testOne) |
| 46 | +Test Preparation Started (PHPUnit\TestFixture\TestWithDifferentDurations::testThree) |
| 47 | +Test Prepared (PHPUnit\TestFixture\TestWithDifferentDurations::testThree) |
| 48 | +Test Passed (PHPUnit\TestFixture\TestWithDifferentDurations::testThree) |
| 49 | +Test Finished (PHPUnit\TestFixture\TestWithDifferentDurations::testThree) |
| 50 | +Test Suite Finished (PHPUnit\TestFixture\TestWithDifferentDurations, 3 tests) |
| 51 | +Test Suite Finished (order-by-duration, 3 tests) |
| 52 | +Test Suite Finished (%sorder-by-duration.phpunit.xml, 3 tests) |
| 53 | +Test Runner Execution Finished |
| 54 | +Test Runner Finished |
| 55 | +PHPUnit Finished (Shell Exit Code: 0) |
0 commit comments