Skip to content

Commit

Permalink
make tests compatible with phpunit for php8
Browse files Browse the repository at this point in the history
  • Loading branch information
willemwollebrants committed Jul 7, 2021
1 parent da91bde commit 035eca3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/Valitron/LangTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@ public function testDefaultLangDirShouldBePackageLangDir()

public function testLangException()
{
$this->expectException("InvalidArgumentException");
$this->expectExceptionMessage("Fail to load language file '/this/dir/does/not/exists/en.php'");
try{
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());
}
}


Expand Down

0 comments on commit 035eca3

Please sign in to comment.