diff --git a/src/Util/Configuration.php b/src/Util/Configuration.php index b79916c843d..6b4db4faec9 100644 --- a/src/Util/Configuration.php +++ b/src/Util/Configuration.php @@ -853,6 +853,10 @@ public function getPHPUnitConfiguration(): array case 'no-depends': $result['resolveDependencies'] = false; + break; + case 'duration': + $result['executionOrder'] = TestSuiteSorter::ORDER_DURATION; + break; } } diff --git a/tests/end-to-end/execution-order/_files/order-by-duration.phpunit.xml b/tests/end-to-end/execution-order/_files/order-by-duration.phpunit.xml new file mode 100644 index 00000000000..6762ce594d8 --- /dev/null +++ b/tests/end-to-end/execution-order/_files/order-by-duration.phpunit.xml @@ -0,0 +1,11 @@ + + + + . + + + diff --git a/tests/end-to-end/execution-order/order-by-duration-via-phpunit-xml.phpt b/tests/end-to-end/execution-order/order-by-duration-via-phpunit-xml.phpt new file mode 100644 index 00000000000..604e35d9919 --- /dev/null +++ b/tests/end-to-end/execution-order/order-by-duration-via-phpunit-xml.phpt @@ -0,0 +1,35 @@ +--TEST-- +phpunit --order-by=duration ./tests/end-to-end/execution-order/_files/TestWithDifferentDurations.php +--FILE-- +