Skip to content

Commit

Permalink
Convert parameter name to lowercase when removing an element from Par…
Browse files Browse the repository at this point in the history
…ameterBag
  • Loading branch information
aderuwe committed Sep 10, 2012
1 parent e7059b4 commit 690e28e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Expand Up @@ -135,7 +135,7 @@ public function has($name)
*/
public function remove($key)
{
unset($this->parameters[$key]);
unset($this->parameters[strtolower($key)]);
}

/**
Expand Down
Expand Up @@ -54,6 +54,8 @@ public function testRemove()
));
$bag->remove('foo');
$this->assertEquals(array('bar' => 'bar'), $bag->all(), '->remove() removes a parameter');
$bag->remove('BAR');
$this->assertEquals(array(), $bag->all(), '->remove() converts key to lowercase before removing');
}

/**
Expand Down

0 comments on commit 690e28e

Please sign in to comment.