@@ 89-102 (lines=14) @@ | ||
86 | } |
|
87 | ||
88 | /** @test */ |
|
89 | public function to_dot_notation(): void |
|
90 | { |
|
91 | $string = 'data[first][]'; |
|
92 | $this->assertSame('data.first[]', Str::toDotNotation($string)); |
|
93 | ||
94 | $string = 'data[first][second]'; |
|
95 | $this->assertSame('data.first.second', Str::toDotNotation($string)); |
|
96 | ||
97 | $string = 'data[first][second]third'; |
|
98 | $this->assertSame('data.first.secondthird', Str::toDotNotation($string)); |
|
99 | ||
100 | $string = 'data[first][second][0]'; |
|
101 | $this->assertSame('data.first.second.0', Str::toDotNotation($string)); |
|
102 | } |
|
103 | ||
104 | /** @test */ |
|
105 | public function convert_to_utf8(): void |
|
@@ 105-118 (lines=14) @@ | ||
102 | } |
|
103 | ||
104 | /** @test */ |
|
105 | public function convert_to_utf8(): void |
|
106 | { |
|
107 | $data = 'hello žš, გამარჯობა'; |
|
108 | $this->assertSame('hello žš, გამარჯობა', Str::convertToUtf8($data)); |
|
109 | ||
110 | $data = 'Hírek'; |
|
111 | $this->assertSame('Hírek', Str::convertToUtf8($data)); |
|
112 | ||
113 | $data = 'H�rek'; |
|
114 | $this->assertSame('H�rek', Str::convertToUtf8($data)); |
|
115 | ||
116 | $data = "Fédération Camerounaise de Football\n"; |
|
117 | $this->assertSame('Fédération Camerounaise de Football', Str::convertToUtf8($data)); |
|
118 | } |
|
119 | } |
|
120 |