18 public function testOrder( $first, $second, $msg ) {
19 $sortkey1 = $this->collation->getSortKey( $first );
20 $sortkey2 = $this->collation->getSortKey( $second );
22 $this->assertTrue( strcmp( $sortkey1, $sortkey2 ) < 0, $msg );
27 [
'X',
'Z',
'Maintain order of unrearranged' ],
28 [
'D',
'C',
'Actually resorts' ],
29 [
'D',
'B',
'resort test 2' ],
30 [
'Adobe',
'Abode',
'not first letter' ],
31 [
'💩 ',
'C',
'Test relocated to end' ],
32 [
'c',
'b',
'lowercase' ],
33 [
'x',
'z',
'lowercase original' ],
34 [
'C50D',
'C100',
'Numbers' ]
42 $this->assertSame( $this->collation->getFirstLetter( $string ), $first );
51 [
"\xF3\xB3\x80\x80Foo",
'D' ],
52 [
"\xF3\xB3\x80\x81Foo",
'C' ],
53 [
"\xF3\xB3\x80\x82Foo",
'B' ],
54 [
"\xF3\xB3\x80\x83Foo",
"\xF3\xB3\x80\x83" ],