Skip to content

Commit 690184a

Browse files
TestCase - runTestMethod
1 parent fd9d510 commit 690184a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Framework/TestCase.php

Lines changed: 7 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,11 @@ public function runTest(string $method, ?array $args = null): void
148148
}
149149

150150

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

0 commit comments

Comments
 (0)