Used before a call to `assert*()` if you expect the test assertion to generate an exception or PHP error. If no error or exception is thrown, a test failure will be reported. Can be called multiple times per assertion, if more than one error is expected.

ParĂ¢metros

  • mixed $message A string indicating what the error text is expected to be. This can be an exact string, a /-delimited regular expression, or true, indicating that any error text is acceptable.

Devolve

void

Source

						public function expectException($message = true) {
		$this->_expected[] = $message;
	}