Skip to content

Commit 575dec7

Browse files
authored
Merge pull request #17 from maplephp/develop
Return TestUnit instance from check method
2 parents a20ea2e + 501ddcb commit 575dec7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/TestCase.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ public function expect(mixed $value): Expect
358358
* @return void
359359
* @throws ErrorException
360360
*/
361-
public function check(Closure $validation, ?string $describe = null): void
361+
public function check(Closure $validation, ?string $describe = null): TestUnit
362362
{
363363

364364
$expectInst = null;
@@ -379,6 +379,7 @@ public function check(Closure $validation, ?string $describe = null): void
379379
$this->testUnit->setThrowable(new ExceptionItem($blunderSoftException));
380380
}
381381
$this->testUnit->setTestValue($this->expect->getValue());
382+
return $this->testUnit;
382383
}
383384

384385

0 commit comments

Comments
 (0)