From 0abca2aeadc179bbb3d8e7efa53192d459adba48 Mon Sep 17 00:00:00 2001 From: benjamin Date: Sun, 3 Dec 2023 16:11:51 +0000 Subject: [PATCH] testUrl: pass all the params needed to build crm-l10n.js --- tests/phpunit/E2E/Core/PathUrlTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/E2E/Core/PathUrlTest.php b/tests/phpunit/E2E/Core/PathUrlTest.php index e8c1f92679..6c71cf2b2b 100644 --- a/tests/phpunit/E2E/Core/PathUrlTest.php +++ b/tests/phpunit/E2E/Core/PathUrlTest.php @@ -77,7 +77,11 @@ class PathUrlTest extends \CiviEndToEndTestCase { // Make some requests for actual URLs $this->assertUrlContentRegex(';MIT-LICENSE.txt;', \Civi::url('[civicrm.packages]/jquery/plugins/jquery.timeentry.js', 'a')); $this->assertUrlContentRegex(';MIT-LICENSE.txt;', \Civi::url('asset://[civicrm.packages]/jquery/plugins/jquery.timeentry.js', 'a')); - $this->assertUrlContentRegex(';Please enter a valid email address;', \Civi::url('assetBuilder://crm-l10n.js?locale=en_US', 'a')); + // crm-10n.js needs a fair few url params + $this->assertUrlContentRegex( + ';Please enter a valid email address;', + \Civi::url('assetBuilder://crm-l10n.js', 'a')->addQuery(\CRM_Core_Resources::getL10nJsParams()) + ); $this->assertUrlContentRegex(';.module..crmSearchAdmin;', \Civi::url('ext://org.civicrm.search_kit/ang/crmSearchAdmin.module.js', 'a')); $this->assertUrlContentRegex(';crm-section event_date_time-section;', \Civi::url('frontend://civicrm/event/info?id=1', 'a')); -- 2.25.1