From 80f4d44a0a254420d915db42213a0ceaf2ffc44a Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 8 Aug 2022 02:24:33 -0700 Subject: [PATCH] (NFC) Mark various tests with `@group locale` Note: There seems to be some weirdness when running the full-group. But breaking down by a couple folders may help: ``` civibuild restore dmaster --no-cms ; CIVICRM_UF=UnitTests phpunit8 tests/phpunit/api/ --debug --group locale --stop-on-failure civibuild restore dmaster --no-cms ; CIVICRM_UF=UnitTests phpunit8 tests/phpunit/CRM/ --debug --group locale --stop-on-failure civibuild restore dmaster --no-cms ; CIVICRM_UF=UnitTests phpunit8 tests/phpunit/Civi/ --debug --group locale --stop-on-failure ``` --- .../CRM/Contribute/Form/ContributionPageTranslationTest.php | 1 + tests/phpunit/CRM/Core/I18n/LocaleTest.php | 1 + tests/phpunit/CRM/Core/I18n/SchemaTest.php | 1 + tests/phpunit/CRM/Core/Smarty/plugins/CrmMoneyTest.php | 1 + tests/phpunit/CRM/Mailing/BAO/MailingTest.php | 1 + tests/phpunit/CRM/Utils/MoneyTest.php | 1 + tests/phpunit/Civi/Core/FormatTest.php | 1 + tests/phpunit/Civi/Token/TokenProcessorTest.php | 3 +++ tests/phpunit/api/v3/MultilingualTest.php | 1 + 9 files changed, 11 insertions(+) diff --git a/tests/phpunit/CRM/Contribute/Form/ContributionPageTranslationTest.php b/tests/phpunit/CRM/Contribute/Form/ContributionPageTranslationTest.php index f4240b3ea6..e498b25dbe 100644 --- a/tests/phpunit/CRM/Contribute/Form/ContributionPageTranslationTest.php +++ b/tests/phpunit/CRM/Contribute/Form/ContributionPageTranslationTest.php @@ -13,6 +13,7 @@ * Test ContributionPage translation features. * * @group headless + * @group locale */ class CRM_Contribute_Form_ContributionPageTranslationTest extends CiviUnitTestCase { diff --git a/tests/phpunit/CRM/Core/I18n/LocaleTest.php b/tests/phpunit/CRM/Core/I18n/LocaleTest.php index c0735b850c..29c27fbbdf 100644 --- a/tests/phpunit/CRM/Core/I18n/LocaleTest.php +++ b/tests/phpunit/CRM/Core/I18n/LocaleTest.php @@ -11,6 +11,7 @@ /** * Class CRM_Core_I18n_LocaleTest * @group headless + * @group locale */ class CRM_Core_I18n_LocaleTest extends CiviUnitTestCase { diff --git a/tests/phpunit/CRM/Core/I18n/SchemaTest.php b/tests/phpunit/CRM/Core/I18n/SchemaTest.php index 7c395b5073..4949047ac9 100644 --- a/tests/phpunit/CRM/Core/I18n/SchemaTest.php +++ b/tests/phpunit/CRM/Core/I18n/SchemaTest.php @@ -11,6 +11,7 @@ /** * Class CRM_Core_I18n_SchemaTest * @group headless + * @group locale */ class CRM_Core_I18n_SchemaTest extends CiviUnitTestCase { diff --git a/tests/phpunit/CRM/Core/Smarty/plugins/CrmMoneyTest.php b/tests/phpunit/CRM/Core/Smarty/plugins/CrmMoneyTest.php index 88e7e9b8fc..474eb88004 100644 --- a/tests/phpunit/CRM/Core/Smarty/plugins/CrmMoneyTest.php +++ b/tests/phpunit/CRM/Core/Smarty/plugins/CrmMoneyTest.php @@ -3,6 +3,7 @@ /** * Class CRM_Core_Smarty_plugins_CrmMoneyTest * @group headless + * @group locale */ class CRM_Core_Smarty_plugins_CrmMoneyTest extends CiviUnitTestCase { diff --git a/tests/phpunit/CRM/Mailing/BAO/MailingTest.php b/tests/phpunit/CRM/Mailing/BAO/MailingTest.php index f1327ee35c..30428e6c70 100644 --- a/tests/phpunit/CRM/Mailing/BAO/MailingTest.php +++ b/tests/phpunit/CRM/Mailing/BAO/MailingTest.php @@ -276,6 +276,7 @@ class CRM_Mailing_BAO_MailingTest extends CiviUnitTestCase { * @throws \CiviCRM_API3_Exception * @throws \CRM_Core_Exception * @throws \API_Exception + * @group locale */ public function testGetRecipientsEmailGroupIncludeExclude(): void { // Create contacts diff --git a/tests/phpunit/CRM/Utils/MoneyTest.php b/tests/phpunit/CRM/Utils/MoneyTest.php index f4cb5718ee..ce47e3b01e 100644 --- a/tests/phpunit/CRM/Utils/MoneyTest.php +++ b/tests/phpunit/CRM/Utils/MoneyTest.php @@ -3,6 +3,7 @@ /** * Class CRM_Utils_RuleTest * @group headless + * @group locale */ class CRM_Utils_MoneyTest extends CiviUnitTestCase { diff --git a/tests/phpunit/Civi/Core/FormatTest.php b/tests/phpunit/Civi/Core/FormatTest.php index c61f70b2cd..93920d8c85 100644 --- a/tests/phpunit/Civi/Core/FormatTest.php +++ b/tests/phpunit/Civi/Core/FormatTest.php @@ -20,6 +20,7 @@ use CiviUnitTestCase; * * @package Civi\Core * @group headless + * @group locale */ class FormatTest extends CiviUnitTestCase { diff --git a/tests/phpunit/Civi/Token/TokenProcessorTest.php b/tests/phpunit/Civi/Token/TokenProcessorTest.php index 14987ea19a..9829235ac4 100644 --- a/tests/phpunit/Civi/Token/TokenProcessorTest.php +++ b/tests/phpunit/Civi/Token/TokenProcessorTest.php @@ -177,6 +177,9 @@ class TokenProcessorTest extends \CiviUnitTestCase { } } + /** + * @group locale + */ public function testRenderLocalizedSmarty() { \CRM_Utils_Time::setTime('2022-04-08 16:32:04'); $resetTime = \CRM_Utils_AutoClean::with(['CRM_Utils_Time', 'resetTime']); diff --git a/tests/phpunit/api/v3/MultilingualTest.php b/tests/phpunit/api/v3/MultilingualTest.php index f619443929..1b8dc14018 100644 --- a/tests/phpunit/api/v3/MultilingualTest.php +++ b/tests/phpunit/api/v3/MultilingualTest.php @@ -14,6 +14,7 @@ * * @package CiviCRM * @group headless + * @group locale */ class api_v3_MultilingualTest extends CiviUnitTestCase { protected $_apiversion = 3; -- 2.25.1