diff --git a/tests/end-to-end/_files/execution-order/TestWithDifferentDurations.php b/tests/end-to-end/_files/execution-order/TestWithDifferentDurations.php new file mode 100644 index 00000000000..102620c1833 --- /dev/null +++ b/tests/end-to-end/_files/execution-order/TestWithDifferentDurations.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +use PHPUnit\Framework\TestCase; + +final class TestWithDifferentDurations extends TestCase +{ + public function testOne(): void + { + $this->assertTrue(true); + } + + public function testTwo(): void + { + $this->assertTrue(true); + } + + public function testThree(): void + { + $this->assertTrue(true); + } +} diff --git a/tests/end-to-end/_files/execution-order/TestWithDifferentDurations.phpunit.result.cache.txt b/tests/end-to-end/_files/execution-order/TestWithDifferentDurations.phpunit.result.cache.txt new file mode 100644 index 00000000000..732de2bb136 --- /dev/null +++ b/tests/end-to-end/_files/execution-order/TestWithDifferentDurations.phpunit.result.cache.txt @@ -0,0 +1 @@ +C:30:"PHPUnit\Runner\TestResultCache":199:{a:2:{s:7:"defects";a:0:{}s:5:"times";a:3:{s:35:"TestWithDifferentDurations::testOne";d:1.000;s:35:"TestWithDifferentDurations::testTwo";d:0.500;s:37:"TestWithDifferentDurations::testThree";d:1.500;}}} diff --git a/tests/end-to-end/execution-order/order-by-duration-via-cli.phpt b/tests/end-to-end/execution-order/order-by-duration-via-cli.phpt new file mode 100644 index 00000000000..88829c830b9 --- /dev/null +++ b/tests/end-to-end/execution-order/order-by-duration-via-cli.phpt @@ -0,0 +1,34 @@ +--TEST-- +phpunit --order-by=duration ./tests/end-to-end/_files/execution-order/TestWithDifferentDurations.php +--FILE-- +