mirror of
https://github.com/vlucas/valitron.git
synced 2025-12-31 07:01:54 +00:00
make tests compatible with phpunit for php8
This commit is contained in:
parent
da91bdea70
commit
035eca3093
@ -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());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user