Skip to content

Commit

Permalink
Fix changing cases of keys instead of values
Browse files Browse the repository at this point in the history
  • Loading branch information
jsor committed Feb 11, 2016
1 parent 524845e commit c67d190
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private function resolveKey($key)

private function setMapping(array $mapping)
{
$this->mapping = array_map('strtolower', $mapping);
$this->mapping = array_change_key_case($mapping, CASE_LOWER);
}

private function setWhitelist($whitelist)
Expand Down
4 changes: 2 additions & 2 deletions tests/ResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ public function it_is_configurable_via_methods()

$resolver = $resolver
->withMapping(array(
'width' => 'w',
'dpr' => 'device-pixel-ratio',
'Width' => 'w',
'Dpr' => 'device-pixel-ratio',
))
->withWhitelist(array(
'width',
Expand Down

0 comments on commit c67d190

Please sign in to comment.