mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
fix: higher order message
This commit is contained in:
19
tests/Unit/Support/HigherOrderMessage.php
Normal file
19
tests/Unit/Support/HigherOrderMessage.php
Normal 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__);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user