diff --git a/src/PendingObjects/TestCall.php b/src/PendingObjects/TestCall.php index 4ad60bde..81349be1 100644 --- a/src/PendingObjects/TestCall.php +++ b/src/PendingObjects/TestCall.php @@ -59,14 +59,14 @@ final class TestCall /** * 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 ->proxies - ->add(Backtrace::file(), Backtrace::line(), 'expectException', [$exceptionClass]); + ->add(Backtrace::file(), Backtrace::line(), 'expectException', [$exception]); } else { - $exceptionMessage = $exceptionClass; + $exceptionMessage = $exception; } if (is_string($exceptionMessage)) {