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