Skip to content

Commit c3cf619

Browse files
TestCase - runTestMethod
1 parent fd9d510 commit c3cf619

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/Framework/TestCase.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,13 @@ public function runTest(string $method, ?array $args = null): void
117117
try {
118118
if ($info['throws']) {
119119
$e = Assert::error(function () use ($method, $params): void {
120-
[$this, $method->getName()](...$params);
120+
$this->runTestMethod($method->getName(), $params);
121121
}, ...$throws);
122122
if ($e instanceof AssertException) {
123123
throw $e;
124124
}
125125
} else {
126-
[$this, $method->getName()](...$params);
126+
$this->runTestMethod($method->getName(), $params);
127127
}
128128
} catch (\Throwable $e) {
129129
$this->handleErrors = false;
@@ -148,6 +148,12 @@ public function runTest(string $method, ?array $args = null): void
148148
}
149149

150150

151+
protected function runTestMethod($name, $params): void
152+
{
153+
[$this, $name](...$params);
154+
}
155+
156+
151157
/**
152158
* @return mixed
153159
*/

0 commit comments

Comments
 (0)