diff options
Diffstat (limited to 'tests/lib/RichObjectStrings/ValidatorTest.php')
-rw-r--r-- | tests/lib/RichObjectStrings/ValidatorTest.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/lib/RichObjectStrings/ValidatorTest.php b/tests/lib/RichObjectStrings/ValidatorTest.php index cbd54a0374c..c5f88394a33 100644 --- a/tests/lib/RichObjectStrings/ValidatorTest.php +++ b/tests/lib/RichObjectStrings/ValidatorTest.php @@ -10,6 +10,7 @@ namespace Test\RichObjectStrings; use OC\RichObjectStrings\Validator; use OCP\RichObjectStrings\Definitions; +use OCP\RichObjectStrings\InvalidObjectExeption; use Test\TestCase; class ValidatorTest extends TestCase { @@ -36,6 +37,9 @@ class ValidatorTest extends TestCase { ]); $this->addToAssertionCount(2); + $this->expectException(InvalidObjectExeption::class); + + $this->expectExceptionMessage('Object for placeholder string1 is invalid, value 123 for key key is not a string'); $v->validate('test {string1} test.', [ 'string1' => [ 'type' => 'user', @@ -45,6 +49,7 @@ class ValidatorTest extends TestCase { ], ]); + $this->expectExceptionMessage('Object for placeholder string1 is invalid, key 456 is not a string'); $v->validate('test {string1} test.', [ 'string1' => [ 'type' => 'user', |