1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 13:12:41 +00:00

Tests for new exception features

This commit is contained in:
J. King 2021-02-07 09:07:53 -05:00
parent 6c2de89f3e
commit 37fd2ad4e9
2 changed files with 11 additions and 1 deletions

View file

@ -132,6 +132,6 @@ abstract class AbstractException extends \Exception {
}
public function getParams(): array {
return $this->aparams;
return $this->params;
}
}

View file

@ -78,4 +78,14 @@ class TestException extends \JKingWeb\Arsse\Test\AbstractTest {
$this->expectException('JKingWeb\Arsse\ExceptionFatal');
throw new \JKingWeb\Arsse\ExceptionFatal("");
}
public function testGetExceptionSymbol(): void {
$e = new LangException("stringMissing", ['msgID' => "OOK"]);
$this->assertSame("stringMissing", $e->getSymbol());
}
public function testGetExceptionParams(): void {
$e = new LangException("stringMissing", ['msgID' => "OOK"]);
$this->assertSame(['msgID' => "OOK"], $e->getParams());
}
}