Skip to content

Commit

Permalink
test: invalid configuration exception
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed May 24, 2023
1 parent 1c79c30 commit 039ba86
Showing 1 changed file with 2 additions and 4 deletions.
Expand Up @@ -70,6 +70,7 @@
use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
use Symfony\Bundle\SecurityBundle\SecurityBundle;
use Symfony\Bundle\TwigBundle\TwigBundle;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
Expand Down Expand Up @@ -1243,12 +1244,9 @@ public function testHttpCacheBanConfiguration(): void
$this->assertEquals('api_platform.http_cache.http_client', $service->getArgument(0)->getTag());
}

/**
* @group legacy
*/
public function testLegacyOpenApiApiKeysConfiguration(): void
{
$this->expectDeprecation('Since api-platform/core 3.1: The swagger api_keys key "Some Authorization Name" is not valid with OpenAPI 3.1 it should match "^[a-zA-Z0-9._-]+$"');
$this->expectException(InvalidConfigurationException::class);
$config = self::DEFAULT_CONFIG;
$config['api_platform']['swagger']['api_keys']['Some Authorization Name'] = ['name' => 'a', 'type' => 'header'];

Expand Down

0 comments on commit 039ba86

Please sign in to comment.