From 872035202871d5c5bb257b950965d1b1b77ce278 Mon Sep 17 00:00:00 2001 From: Chris Burgess Date: Fri, 10 Aug 2018 22:11:54 +1200 Subject: [PATCH] Issue #316: Expand cache key test coverage with emoji --- tests/phpunit/CRM/Core/BAO/CacheTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/phpunit/CRM/Core/BAO/CacheTest.php b/tests/phpunit/CRM/Core/BAO/CacheTest.php index af738cbb2b4..8987f9e853d 100644 --- a/tests/phpunit/CRM/Core/BAO/CacheTest.php +++ b/tests/phpunit/CRM/Core/BAO/CacheTest.php @@ -86,6 +86,8 @@ public function getCleanKeyExamples() { $es = []; $es[] = ['hello_world and/other.planets', 'hello_world-20and-2fother.planets']; // allowed chars $es[] = ['hello/world+-#@{}', 'hello-2fworld-2b-2d-23-40-7b-7d']; // escaped chars + $es[] = ["LF-\nTAB-\tCR-\remojiskullđź’€", 'LF-2d-aTAB-2d-9CR-2d-demojiskull-f0-9f-92-80']; // short with emoji + $es[] = ["LF-\nTAB-\tCR-\remojibombđź’Łemojiskullđź’€", '-5d9324e052f6e10240dce5029c5e8525']; // long with emoji $es[] = ['123456789 123456789 123456789 123456789 123456789 123', '123456789-20123456789-20123456789-20123456789-20123456789-20123']; // spaces are escaped $es[] = ['123456789-123456789-123456789-123456789-123456789-123456789-123', '123456789-123456789-123456789-123456789-123456789-123456789-123']; // long but allowed $es[] = ['123456789-123456789-123456789-123456789-123456789-123456789-1234', '-afe584fe1d38b9a007df7d7ba30558e2']; // too long, md5 fallback