Skip to content

Commit

Permalink
Added a protecting when someone is using a lower case method
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Apr 8, 2019
1 parent 90f422f commit 47b2e43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ private function normalize(bool $collection, ResourceMetadata $resourceMetadata,
$supported ? $operation['method'] = $upperOperationName : $operation['route_name'] = $operationName;
}

$operation['method'] = strtoupper($operation['method']);

$newOperations[$operationName] = $operation;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public function testNotPrependSerializerWhenConfigExist()
$containerBuilderProphecy->getExtensionConfig('framework')->willReturn([0 => ['serializer' => ['enabled' => false]]])->shouldBeCalled();
$containerBuilderProphecy->prependExtensionConfig('framework', Argument::any())->willReturn(null)->shouldBeCalled();
$containerBuilderProphecy->prependExtensionConfig('framework', Argument::that(function (array $config) {
return \array_key_exists('serializer', $config);
return array_key_exists('serializer', $config);
}))->shouldNotBeCalled();
$containerBuilder = $containerBuilderProphecy->reveal();

Expand All @@ -188,7 +188,7 @@ public function testNotPrependPropertyInfoWhenConfigExist()
$containerBuilderProphecy->getExtensionConfig('framework')->willReturn([0 => ['property_info' => ['enabled' => false]]])->shouldBeCalled();
$containerBuilderProphecy->prependExtensionConfig('framework', Argument::any())->willReturn(null)->shouldBeCalled();
$containerBuilderProphecy->prependExtensionConfig('framework', Argument::that(function (array $config) {
return \array_key_exists('property_info', $config);
return array_key_exists('property_info', $config);
}))->shouldNotBeCalled();
$containerBuilder = $containerBuilderProphecy->reveal();

Expand Down

0 comments on commit 47b2e43

Please sign in to comment.