19 declare(strict_types=1);
38 $language = $this->getMockBuilder(\
ILIAS\
Language\Language::class)
39 ->disableOriginalConstructor()
43 $this->form_d = $group->utfnormal()->formD();
44 $this->form_c = $group->utfnormal()->formC();
45 $this->form_kc = $group->utfnormal()->formKC();
46 $this->form_kd = $group->utfnormal()->formKD();
53 [
"Ä\uFB03n",
"Ä\uFB03n",
'Ä\uFB03n',
'Ä\uFB03n',
'Ä\uFB03n'],
54 [
"\xC3\x85",
'Å',
'Å',
'Å',
'Å'],
55 [
"\xCC\x8A",
'̊',
'̊',
'̊',
'̊'],
56 [
"\u{FFDA}",
'ᅳ',
'ᅳ',
'ᅳ',
'ᅳ'],
57 [
"\u{FDFA}",
'ﷺ',
'ﷺ',
'صلى الله عليه وسلم',
'صلى الله عليه وسلم'],
58 [
"\xF5",
'',
'',
'',
''],
59 [
"ä",
'ä',
'ä',
'ä',
'ä'],
60 [
"🤔",
"🤔",
"🤔",
"🤔",
"🤔"],
61 [
"你好",
"你好",
"你好",
"你好",
"你好"],
70 string $expected_form_c,
71 string $expected_form_d,
72 string $expected_form_kc,
73 string $expected_form_kd
76 $this->assertEquals($expected_form_c, $this->form_c->transform($string));
79 $this->assertEquals($expected_form_d, $this->form_d->transform($string));
82 $this->assertEquals($expected_form_kc, $this->form_kc->transform($string));
85 $this->assertEquals($expected_form_kd, $this->form_kd->transform($string));
90 $char_A_ring =
"\xC3\x85";
91 $char_combining_ring_above =
'A' .
"\xCC\x8A";
93 $this->assertNotEquals($char_A_ring, $char_combining_ring_above);
94 $this->assertNotEquals(bin2hex($char_A_ring), bin2hex($char_combining_ring_above));
96 $this->assertEquals(
'Å', $tranformation->transform($char_A_ring));
97 $this->assertEquals(bin2hex(
'Å'), bin2hex($tranformation->transform($char_A_ring)));
98 $this->assertEquals(
'Å', $tranformation->transform($char_combining_ring_above));
99 $this->assertEquals(bin2hex(
'Å'), bin2hex($tranformation->transform($char_combining_ring_above)));
101 $tranformation->transform($char_A_ring),
102 $this->form_kd->transform($char_combining_ring_above)
105 bin2hex($tranformation->transform($char_A_ring)),
106 bin2hex($this->form_kd->transform($char_combining_ring_above))
Interface Observer Contains several chained tasks and infos about them.
testNormalization(string $string, string $expected_form_c, string $expected_form_d, string $expected_form_kc, string $expected_form_kd)
stringProvider
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...