[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/_test/tests/inc/ -> sort_without_collator.test.php (summary)

(no description)

File Size: 148 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 _test/tests/inc/sort_with_collator.test.php

Defines 1 class

sort_without_collator_test:: (5 methods):
  setUpBeforeClass()
  tearDownAfterClass()
  testIntlExtensionAvailability()
  provideWordPairs()
  provideSortedCharList()


Class: sort_without_collator_test  - X-Ref

Based on sort_with_collator.test.php.

setUpBeforeClass()   X-Ref
Disable the "intl" extension.


tearDownAfterClass()   X-Ref
Reenable the "intl" extension.


testIntlExtensionAvailability()   X-Ref
Since we always use the fallback sort, we do not check for
the availability of the "intl" extension here at all.


provideWordPairs()   X-Ref
Provide real word pairs of the languages being tested (when possible).
The pairs should show what the fallback sort can or cannot do, as it
simply follows character codes.

In particular, there should be a test to show that every character with
an accent (diacritic) used in the language is WRONGLY sorted after Z.

see: testStrcmp
return: Generator|array

provideSortedCharList()   X-Ref
Provide WRONG sorted sequences of all characters used in the languages
being tested, as the fallback sort simply follows character codes.

The sorted sequences given in class "sort_with_collator" are simply
reordered here, starting with A-Z and continuing with accented characters
ordered by character codes.

see: testSort
see: testKSort
see: testASort
see: testASortFnUrl
see: testASortFnSafe
see: testASortFnUtf8
return: Generator|array