mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
Renames a property to be more inclusive.
This commit is contained in:
@ -59,14 +59,14 @@ final class TestCall
|
|||||||
/**
|
/**
|
||||||
* Asserts that the test throws the given `$exceptionClass` when called.
|
* Asserts that the test throws the given `$exceptionClass` when called.
|
||||||
*/
|
*/
|
||||||
public function throws(string $exceptionClass, string $exceptionMessage = null): TestCall
|
public function throws(string $exception, string $exceptionMessage = null): TestCall
|
||||||
{
|
{
|
||||||
if (class_exists($exceptionClass)) {
|
if (class_exists($exception)) {
|
||||||
$this->testCaseFactory
|
$this->testCaseFactory
|
||||||
->proxies
|
->proxies
|
||||||
->add(Backtrace::file(), Backtrace::line(), 'expectException', [$exceptionClass]);
|
->add(Backtrace::file(), Backtrace::line(), 'expectException', [$exception]);
|
||||||
} else {
|
} else {
|
||||||
$exceptionMessage = $exceptionClass;
|
$exceptionMessage = $exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_string($exceptionMessage)) {
|
if (is_string($exceptionMessage)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user