You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/Symfony/Tests/Component/HttpFoundation/ParameterBagTest.php
+9-4Lines changed: 9 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -171,10 +171,10 @@ public function testFilter()
171
171
$bag = newParameterBag(array(
172
172
'digits' => '0123ab',
173
173
'email' => 'example@example.com',
174
-
'url' => 'http://example.com/',
174
+
'url' => 'http://example.com/foo',
175
175
'dec' => '256',
176
176
'hex' => '0x100',
177
-
'array' => 'bang',
177
+
'array' => array('bang'),
178
178
));
179
179
180
180
$this->assertEmpty($bag->filter('nokey'), '->filter() should return empty by default if no key is found');
@@ -183,7 +183,10 @@ public function testFilter()
183
183
184
184
$this->assertEquals('example@example.com', $bag->filter('email', '', false, FILTER_VALIDATE_EMAIL), '->filter() gets a value of parameter as email');
185
185
186
-
$this->assertNotEquals('http://example.com/foo', $bag->filter('url', '', false, FILTER_VALIDATE_URL, array('flags' => FILTER_FLAG_PATH_REQUIRED)), '->filter() gets a value of parameter as url with a path');
186
+
$this->assertEquals('http://example.com/foo', $bag->filter('url', '', false, FILTER_VALIDATE_URL, array('flags' => FILTER_FLAG_PATH_REQUIRED)), '->filter() gets a value of parameter as url with a path');
187
+
188
+
// This test is repeated for code-coverage
189
+
$this->assertEquals('http://example.com/foo', $bag->filter('url', '', false, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED), '->filter() gets a value of parameter as url with a path');
0 commit comments