File tree Expand file tree Collapse file tree 3 files changed +40
-38
lines changed Expand file tree Collapse file tree 3 files changed +40
-38
lines changed Original file line number Diff line number Diff line change @@ -162,22 +162,4 @@ public function it_successfully_parse_a_http_field(): void
162
162
self ::assertSame (42.0 , $ instance ->get (2 )->value );
163
163
self ::assertInstanceOf (Token::class, $ instance ->get (2 )->parameters ->value ('john ' ));
164
164
}
165
-
166
- /**
167
- * @test
168
- */
169
- public function it_fails_to_parse_an_invalid_http_field (): void
170
- {
171
- $ this ->expectException (SyntaxError::class);
172
- InnerList::fromHttpValue ('("hello)world" 42 42.0;john=doe);foo="bar(" toto ' );
173
- }
174
-
175
- /**
176
- * @test
177
- */
178
- public function it_fails_to_parse_an_invalid_http_field_2 (): void
179
- {
180
- $ this ->expectException (SyntaxError::class);
181
- InnerList::fromHttpValue ('"hello)world" 42 42.0;john=doe);foo="bar(" ' );
182
- }
183
165
}
Original file line number Diff line number Diff line change @@ -144,24 +144,4 @@ public function test_it_can_generate_the_same_value(): void
144
144
145
145
self ::assertSame ($ res ->toHttpValue (), $ list ->toHttpValue ());
146
146
}
147
-
148
- /**
149
- * @test
150
- */
151
- public function it_fails_to_parse_invalid_string_1 (): void
152
- {
153
- $ this ->expectException (SyntaxError::class);
154
-
155
- OrderedList::fromHttpValue ('(foo;number="hello\") ' );
156
- }
157
-
158
- /**
159
- * @test
160
- */
161
- public function it_fails_to_parse_invalid_string_2 (): void
162
- {
163
- $ this ->expectException (SyntaxError::class);
164
-
165
- Dictionary::fromHttpValue ('number="hell\o" ' );
166
- }
167
147
}
Original file line number Diff line number Diff line change @@ -62,4 +62,44 @@ public function it_will_fail_with_wrong_string_utf8(): void
62
62
63
63
Parser::parseDictionary ('a="foébar" ' );
64
64
}
65
+
66
+ /**
67
+ * @test
68
+ */
69
+ public function it_fails_to_parse_invalid_string_1 (): void
70
+ {
71
+ $ this ->expectException (SyntaxError::class);
72
+
73
+ Parser::parseList ('(foo;number="hello\") ' );
74
+ }
75
+
76
+ /**
77
+ * @test
78
+ */
79
+ public function it_fails_to_parse_invalid_string_2 (): void
80
+ {
81
+ $ this ->expectException (SyntaxError::class);
82
+
83
+ Parser::parseDictionary ('number="hell\o" ' );
84
+ }
85
+
86
+ /**
87
+ * @test
88
+ */
89
+ public function it_fails_to_parse_an_invalid_http_field (): void
90
+ {
91
+ $ this ->expectException (SyntaxError::class);
92
+
93
+ Parser::parseInnerList ('("hello)world" 42 42.0;john=doe);foo="bar(" toto ' );
94
+ }
95
+
96
+ /**
97
+ * @test
98
+ */
99
+ public function it_fails_to_parse_an_invalid_http_field_2 (): void
100
+ {
101
+ $ this ->expectException (SyntaxError::class);
102
+
103
+ Parser::parseInnerList ('"hello)world" 42 42.0;john=doe);foo="bar(" ' );
104
+ }
65
105
}
You can’t perform that action at this time.
0 commit comments