mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
20 lines
511 B
PHP
20 lines
511 B
PHP
<?php
|
|
|
|
use Pest\Support\HigherOrderMessage;
|
|
|
|
test('undefined method exceptions', function () {
|
|
$message = new HigherOrderMessage(
|
|
__FILE__,
|
|
1,
|
|
'foqwdqwd',
|
|
[]
|
|
);
|
|
|
|
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__);
|
|
});
|
|
});
|