diff --git a/src/Valitron/Validator.php b/src/Valitron/Validator.php index 04a6244..e25de20 100644 --- a/src/Valitron/Validator.php +++ b/src/Valitron/Validator.php @@ -1,6 +1,8 @@ assertEquals(realpath($this->getLangDir()), realpath(Validator::langDir())); } + + /** + * @expectedException InvalidArgumentException + * @expectedExceptionMessage fail to load language file '/this/dir/does/not/exists/en.php' + */ + public function testLangException() + { + new Validator(array(), array(), 'en', '/this/dir/does/not/exists'); + } }