Skip to content

Commit 0a300bc

Browse files
staabmsebastianbergmann
authored andcommitted
Prevent unnecessary duplicate work in NamePrettifier-> prettifyTestCase()
1 parent c9f300a commit 0a300bc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Logging/TestDox/NamePrettifier.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,9 @@ public function prettifyTestCase(TestCase $test, bool $colorize): string
202202
return $this->prettifiedTestCases[$key];
203203
}
204204

205-
$testDox = MetadataRegistry::parser()->forMethod($test::class, $test->name())->isTestDox()->isMethodLevel();
206-
$callback = MetadataRegistry::parser()->forMethod($test::class, $test->name())->isTestDoxFormatter();
205+
$metadataCollection = MetadataRegistry::parser()->forMethod($test::class, $test->name());
206+
$testDox = $metadataCollection->isTestDox()->isMethodLevel();
207+
$callback = $metadataCollection->isTestDoxFormatter();
207208
$isCustomized = false;
208209

209210
if ($testDox->isNotEmpty()) {

0 commit comments

Comments
 (0)