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/InputBagTest.php
+18
Original file line number
Diff line number
Diff line change
@@ -98,4 +98,22 @@ public function testFilterArrayWithoutArrayFlagIsDeprecated()
98
98
$this->expectDeprecation('Since symfony/http-foundation 5.1: Filtering an array value with "Symfony\Component\HttpFoundation\InputBag::filter()" without passing the FILTER_REQUIRE_ARRAY or FILTER_FORCE_ARRAY flag is deprecated');
99
99
$bag->filter('foo', \FILTER_VALIDATE_INT);
100
100
}
101
+
102
+
publicfunctiontestAdd()
103
+
{
104
+
$bag = newInputBag(['foo' => 'bar']);
105
+
$bag->add(['baz' => 'qux']);
106
+
107
+
$this->assertSame('bar', $bag->get('foo'), '->add() does not remove existing parameters');
108
+
$this->assertSame('qux', $bag->get('baz'), '->add() adds new parameters');
0 commit comments