From f66ab8dae2f3d0418759f81a3a64dc9517a62449 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 15:17:31 +0200 Subject: Adding upstream version 1.10.2. Signed-off-by: Daniel Baumann --- .../Director/Data/RecursiveUtf8ValidatorTest.php | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 test/php/library/Director/Data/RecursiveUtf8ValidatorTest.php (limited to 'test/php/library/Director/Data/RecursiveUtf8ValidatorTest.php') diff --git a/test/php/library/Director/Data/RecursiveUtf8ValidatorTest.php b/test/php/library/Director/Data/RecursiveUtf8ValidatorTest.php new file mode 100644 index 0000000..1434d4a --- /dev/null +++ b/test/php/library/Director/Data/RecursiveUtf8ValidatorTest.php @@ -0,0 +1,45 @@ + 'test 1', + 'value' => 'something', + ], + (object) [ + 'name' => 'test 2', + 'value' => "some\xa1\xa2thing", + ], + ]); + } + + public function testAcceptValidUtf8Characters() + { + $this->assertTrue(RecursiveUtf8Validator::validateRows([ + (object) [ + 'name' => 'test 1', + 'value' => "Some 🍻", + ], + (object) [ + 'name' => 'test 2', + 'value' => [ + (object) [ + 'its' => true, + ['💩'] + ] + ], + ], + ])); + } +} -- cgit v1.2.3