Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slightly Improvement on Exception message #745

Merged
merged 1 commit into from Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Support/ExceptionTrace.php
Expand Up @@ -33,7 +33,7 @@ public static function ensure(Closure $closure)
$message = str_replace(self::UNDEFINED_METHOD, 'Call to undefined method ', $message);

if (class_exists($class) && count(class_parents($class)) > 0 && array_values(class_parents($class))[0] === TestCase::class) {
$message .= '. Did you forget to use the [uses()] function? https://pestphp.com/docs/configuring-tests';
$message .= '. Did you forget to use the [uses()] function? Read more at: https://pestphp.com/docs/configuring-tests';
}

Reflection::setPropertyValue($throwable, 'message', $message);
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Support/ExceptionTrace.php
Expand Up @@ -17,5 +17,5 @@
$this->get();
})->throws(
Error::class,
'Call to undefined method Tests\Unit\Support\ExceptionTrace::get(). Did you forget to use the [uses()] function? https://pestphp.com/docs/configuring-tests',
'Call to undefined method Tests\Unit\Support\ExceptionTrace::get(). Did you forget to use the [uses()] function? Read more at: https://pestphp.com/docs/configuring-tests',
);