forked from ergebnis/phpunit-slow-test-detector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.phpt
30 lines (19 loc) · 1.13 KB
/
test.phpt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--TEST--
With test methods with @maximumDuration annotations
--FILE--
<?php
declare(strict_types=1);
use PHPUnit\TextUI;
$_SERVER['argv'][] = '--configuration=test/EndToEnd/Version08/TestMethod/WithMaximumDurationAnnotation/phpunit.xml';
require_once __DIR__ . '/../../../../../vendor/autoload.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s
Runtime: %s
Configuration: %s/EndToEnd/Version08/TestMethod/WithMaximumDurationAnnotation/phpunit.xml
...... 6 / 6 (100%)
Detected 2 tests where the duration exceeded the maximum duration.
1. 00:00.3%s (00:00.200) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version08\TestMethod\WithMaximumDurationAnnotation\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromAnnotationWhenTestMethodHasValidMaximumDurationAnnotation
2. 00:00.2%s (00:00.100) Ergebnis\PHPUnit\SlowTestDetector\Test\EndToEnd\Version08\TestMethod\WithMaximumDurationAnnotation\SleeperTest::testSleeperSleepsLongerThanMaximumDurationFromXmlConfigurationWhenTestMethodHasInvalidMaximumDurationAnnotation
Time: %s, Memory: %s
OK (6 tests, 6 assertions)