From 03df288e78e7ae334082e3b007ae95890a7cd9ab Mon Sep 17 00:00:00 2001 From: mscherer Date: Fri, 26 Aug 2016 14:45:59 +0200 Subject: [PATCH] Re-add spacing. --- lib/Cake/Test/Case/Utility/HashTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Cake/Test/Case/Utility/HashTest.php b/lib/Cake/Test/Case/Utility/HashTest.php index 5af077282..3dd1fd399 100644 --- a/lib/Cake/Test/Case/Utility/HashTest.php +++ b/lib/Cake/Test/Case/Utility/HashTest.php @@ -1368,14 +1368,17 @@ class HashTest extends CakeTestCase { public function testSortLocale() { // get the current locale $oldLocale = setlocale(LC_COLLATE, '0'); + // the de_DE.utf8 locale must be installed on the system where the test is performed setlocale(LC_COLLATE, 'de_DE.utf8'); + $items = array( array('Item' => array('entry' => 'Übergabe')), array('Item' => array('entry' => 'Ostfriesland')), array('Item' => array('entry' => 'Äpfel')), array('Item' => array('entry' => 'Apfel')), ); + $result = Hash::sort($items, '{n}.Item.entry', 'asc', 'locale'); $expected = array( array('Item' => array('entry' => 'Apfel')), @@ -1384,6 +1387,7 @@ class HashTest extends CakeTestCase { array('Item' => array('entry' => 'Übergabe')), ); $this->assertEquals($expected, $result); + // change to the original locale setlocale(LC_COLLATE, $oldLocale); }