Renames a property to be more inclusive.

This commit is contained in:
luke
2021-07-08 18:39:09 +01:00
parent 99ea9f42e5
commit dd05452edd

View File

@ -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)) {