From cab6c0479682c51e98247d11a69491ec7633fe7e Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 10 Aug 2018 15:52:42 -0700 Subject: [PATCH] dev/core#316 - Update long string cache key test results This is replaces 95b65673b6259be3a02ed6510e7562939d35b6c8. The intent is to have a delimiter every ten chars so that it's easy to read/confirm the length of the string. The delimiter was space, but this became a longer encoded char (`-20`) and threw off the numbers. Switching to dash just gives a different encoded char. To get the counts right, it needs ot be a pass-through char... like underscore. --- tests/phpunit/CRM/Core/BAO/CacheTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/CRM/Core/BAO/CacheTest.php b/tests/phpunit/CRM/Core/BAO/CacheTest.php index ad7653fd56..51c4d537e5 100644 --- a/tests/phpunit/CRM/Core/BAO/CacheTest.php +++ b/tests/phpunit/CRM/Core/BAO/CacheTest.php @@ -88,10 +88,10 @@ class CRM_Core_BAO_CacheTest extends CiviUnitTestCase { $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 12', '123456789-20123456789-20123456789-20123456789-20123456789-20123']; // spaces are escaped - $es[] = ['123456789-123456789-123456789-123456789-123456789-123456789-12', '123456789-123456789-123456789-123456789-123456789-12']; // long but allowed - $es[] = ['123456789-123456789-123456789-123456789-123456789-123456789-123', '-8f6cbe1d258d2ec9a0cffd5ff29ba5d0']; // too long, md5 fallback - $es[] = ['123456789-/23456789-+23456789--23456789-123456789-123456789', '-afe584fe1d38b9a007df7d7ba30558e2']; // too long, md5 fallback + $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', '-e02b981aff954fdcc9a81c25f5ec9681']; // too long, md5 fallback + $es[] = ['123456789-/23456789-+23456789--23456789_123456789_123456789', '-43b6dec1026187ae6f6a8fe4d56ab22e']; // too long, md5 fallback return $es; } -- 2.25.1