From 65b98aa2a41a8499d01c3abb3912cac1c73a1d15 Mon Sep 17 00:00:00 2001 From: Mathieu Lutfy Date: Thu, 1 Nov 2018 13:42:30 -0400 Subject: [PATCH] Add phpunit test for getLocale/setLocale. --- tests/phpunit/CRM/Core/I18n/LocaleTest.php | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 tests/phpunit/CRM/Core/I18n/LocaleTest.php diff --git a/tests/phpunit/CRM/Core/I18n/LocaleTest.php b/tests/phpunit/CRM/Core/I18n/LocaleTest.php new file mode 100644 index 0000000000..cb1e88fb6f --- /dev/null +++ b/tests/phpunit/CRM/Core/I18n/LocaleTest.php @@ -0,0 +1,55 @@ +enableMultilingual(); + CRM_Core_I18n_Schema::addLocale('fr_CA', 'en_US'); + + CRM_Core_I18n::singleton()->setLocale('fr_CA'); + $locale = CRM_Core_I18n::getLocale(); + + $this->assertEquals($locale, 'fr_CA'); + } + +} -- 2.25.1