mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Re-add spacing.
This commit is contained in:
parent
dab4b85596
commit
03df288e78
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue