fix: higher order message

This commit is contained in:
Nuno Maduro
2023-06-15 10:42:31 +02:00
parent a0d0182031
commit 070139eda7
2 changed files with 22 additions and 5 deletions

View File

@ -0,0 +1,19 @@
<?php
use Pest\Support\HigherOrderMessage;
test('undefined method exceptions', function () {
$message = new HigherOrderMessage(
__FILE__,
1,
'foqwdqwd',
null
);
expect(fn () => $message->call($this))->toThrow(function (ReflectionException $exception) {
expect($exception)
->getMessage()->toBe('Call to undefined method PHPUnit\Framework\TestCase::foqwdqwd()')
->getLine()->toBe(1)
->getFile()->toBe(__FILE__);
});
});