aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2025-04-09 08:35:56 +0200
committerJoas Schilling <coding@schilljs.com>2025-04-09 08:35:56 +0200
commit8358a7f769c6bab897b8593baaf37e76024ead82 (patch)
tree08eb59d282de0164105f5cca0db8ddfddecfdae6 /tests/lib
parentedeccc897f9994abeba6a7246349662ac22f2936 (diff)
downloadnextcloud-server-revert/52035.tar.gz
nextcloud-server-revert/52035.zip
Revert "refactor(RichObjectStrings): Only log error if key or value is not string in validator"revert/52035
This reverts commit fd156d3408a030c6bb98d9cdaf3790375d766eb5. Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/RichObjectStrings/ValidatorTest.php5
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',