From c9c175f9978c914934ba86b914d033b63c7396f5 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 20 Oct 2014 14:46:21 -0700 Subject: [PATCH] CaseType XML - Generate UTF-8 instead of ISO-8859-1 http://forum.civicrm.org/index.php?topic=34525.new --- CRM/Case/BAO/CaseType.php | 2 +- tests/phpunit/CRM/Case/BAO/CaseTypeTest.php | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CRM/Case/BAO/CaseType.php b/CRM/Case/BAO/CaseType.php index 063df8c70a..4add3227cb 100644 --- a/CRM/Case/BAO/CaseType.php +++ b/CRM/Case/BAO/CaseType.php @@ -107,7 +107,7 @@ class CRM_Case_BAO_CaseType extends CRM_Case_DAO_CaseType { * @access public */ static function convertDefinitionToXML($name, $definition) { - $xmlFile = '' . "\n\n\n"; + $xmlFile = '' . "\n\n\n"; $xmlFile .= "{$name}\n"; if (array_key_exists('forkable', $definition)) { diff --git a/tests/phpunit/CRM/Case/BAO/CaseTypeTest.php b/tests/phpunit/CRM/Case/BAO/CaseTypeTest.php index ebccffad52..22bdbb4f41 100644 --- a/tests/phpunit/CRM/Case/BAO/CaseTypeTest.php +++ b/tests/phpunit/CRM/Case/BAO/CaseTypeTest.php @@ -15,7 +15,7 @@ class CRM_Case_BAO_CaseTypeTest extends CiviUnitTestCase { function definitionProvider() { $fixtures['empty-defn'] = array( 'json' => json_encode(array()), - 'xml' => ' + 'xml' => ' Housing Support @@ -28,7 +28,7 @@ class CRM_Case_BAO_CaseTypeTest extends CiviUnitTestCase { 'activityTypes' => array(), 'caseRoles' => array(), )), - 'xml' => ' + 'xml' => ' Housing Support @@ -41,7 +41,7 @@ class CRM_Case_BAO_CaseTypeTest extends CiviUnitTestCase { $fixtures['one-item-in-each'] = array( 'json' => json_encode(array( 'activityTypes' => array( - array('name' => 'First act'), + array('name' => 'First act (foréign éxamplé)'), ), 'activitySets' => array( array( @@ -57,12 +57,12 @@ class CRM_Case_BAO_CaseTypeTest extends CiviUnitTestCase { array('name' => 'First role', 'creator' => 1, 'manager' => 1), ), )), - 'xml' => ' + 'xml' => ' Housing Support - First act + First act (foréign éxamplé) @@ -125,7 +125,7 @@ class CRM_Case_BAO_CaseTypeTest extends CiviUnitTestCase { array('name' => 'Second role'), ), )), - 'xml' => ' + 'xml' => ' Housing Support @@ -186,7 +186,7 @@ class CRM_Case_BAO_CaseTypeTest extends CiviUnitTestCase { 'json' => json_encode(array( 'forkable' => 0, )), - 'xml' => ' + 'xml' => ' Housing Support 0 @@ -198,7 +198,7 @@ class CRM_Case_BAO_CaseTypeTest extends CiviUnitTestCase { 'json' => json_encode(array( 'forkable' => 1, )), - 'xml' => ' + 'xml' => ' Housing Support 1 @@ -285,4 +285,4 @@ class CRM_Case_BAO_CaseTypeTest extends CiviUnitTestCase { ) ); } -} \ No newline at end of file +} -- 2.25.1