public function testUnknownException() { error_reporting(-1); $this->setExpectedException('ML\E2e\UnknownException'); ErrorHandler::handler(666, "Fake error", __FILE__, __LINE__, ''); }
/** * Strict errors are triggered in compile time, so we just included class * with strict errors later than ErrorHandler... */ public function testThrowStrictException() { error_reporting(-1); ML\E2e\ErrorHandler::run(); $this->setExpectedException('ML\E2e\StrictException'); include(__DIR__ . '/strict.php'); }