make tests compatible with phpunit for php8

This commit is contained in:
Willem Wollebrants 2021-07-07 11:47:59 +02:00
parent da91bdea70
commit 035eca3093

View File

@ -45,9 +45,12 @@ class LangTest extends BaseTestCase
public function testLangException() public function testLangException()
{ {
$this->expectException("InvalidArgumentException"); try{
$this->expectExceptionMessage("Fail to load language file '/this/dir/does/not/exists/en.php'");
new Validator(array(), array(), 'en', '/this/dir/does/not/exists'); new Validator(array(), array(), 'en', '/this/dir/does/not/exists');
} catch (Exception $exception){
$this->assertInstanceOf("InvalidArgumentException", $exception);
$this->assertEquals("Fail to load language file '/this/dir/does/not/exists/en.php'", $exception->getMessage());
}
} }