Skip to content
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.

Commit

Permalink
Improve method reflection in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nesk committed Oct 31, 2020
1 parent 83c906e commit 5636bbf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public function setUp(): void
{
parent::setUp();

$testMethod = new \ReflectionMethod($this, $this->getName());
$methodName = explode(' ', $this->getName())[0] ?? '';
$testMethod = new \ReflectionMethod($this, $methodName);
$docComment = $testMethod->getDocComment();

if (preg_match('/@dontPopulateProperties (.*)/', $docComment, $matches)) {
Expand Down

0 comments on commit 5636bbf

Please sign in to comment.