Skip to content

Commit a942859

Browse files
committed
TestCase: lists the running methods
1 parent cddfd74 commit a942859

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

src/Framework/TestCase.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,12 @@ public function run(): void
5656
foreach ($methods as $method) {
5757
try {
5858
$this->runTest($method);
59+
Environment::print(Dumper::color('lime', '') . " $method");
5960
} catch (TestCaseSkippedException $e) {
60-
echo "\nSkipped:\n{$e->getMessage()}\n";
61+
Environment::print("s $method {$e->getMessage()}");
62+
} catch (\Throwable $e) {
63+
Environment::print(Dumper::color('red', '×') . " $method\n\n");
64+
throw $e;
6165
}
6266
}
6367
}

tests/Framework/TestCase.errors.4.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* @exitCode 255
5-
* @outputMatch #^Test::setUp,Exception: setUp\s+in#
5+
* @outputMatch #^Test::setUp,× testMe\s+Exception: setUp\s+in#
66
*/
77

88
declare(strict_types=1);

tests/Framework/TestCase.errors.5.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* @exitCode 255
5-
* @outputMatch #^Test::setUp,Test::testMe,Test::tearDown,Exception: testMe\s+in#
5+
* @outputMatch #^Test::setUp,Test::testMe,Test::tearDown,× testMe\s+Exception: testMe\s+in#
66
*/
77

88
declare(strict_types=1);

tests/Framework/TestCase.errors.6.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* @exitCode 255
5-
* @outputMatch #^Test::setUp,Test::testMe,Test::tearDown,Exception: tearDown\s+in#
5+
* @outputMatch #^Test::setUp,Test::testMe,Test::tearDown,× testMe\s+Exception: tearDown\s+in#
66
*/
77

88
declare(strict_types=1);

tests/Framework/TestCase.order.errorMuted.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* @outputMatch Test::setUp,Test::testMe,Test::tearDown
4+
* @outputMatch Test::setUp,Test::testMe,Test::tearDown√ testMe
55
*/
66

77
declare(strict_types=1);

0 commit comments

Comments
 (0)