Skip to content

Commit 32f3524

Browse files
Deuchnordalanpoulain
authored andcommitted
tests: fix OpenApiFactory (#39)
1 parent 7479f51 commit 32f3524

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

tests/OpenApi/Factory/OpenApiFactoryTest.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
namespace ApiPlatform\Tests\OpenApi\Factory;
1515

16-
use ApiPlatform\Core\Operation\UnderscorePathSegmentNameGenerator;
1716
use ApiPlatform\JsonSchema\Schema;
1817
use ApiPlatform\JsonSchema\SchemaFactory;
1918
use ApiPlatform\JsonSchema\TypeFactory;
@@ -39,8 +38,6 @@
3938
use ApiPlatform\OpenApi\Model\ExternalDocumentation;
4039
use ApiPlatform\OpenApi\OpenApi;
4140
use ApiPlatform\OpenApi\Options;
42-
use ApiPlatform\PathResolver\CustomOperationPathResolver;
43-
use ApiPlatform\PathResolver\OperationPathResolver;
4441
use ApiPlatform\State\Pagination\PaginationOptions;
4542
use ApiPlatform\Tests\Fixtures\DummyFilter;
4643
use ApiPlatform\Tests\Fixtures\TestBundle\Dto\OutputDto;
@@ -180,8 +177,6 @@ public function testInvoke(): void
180177
(new ApiProperty())->withBuiltinTypes([new Type(Type::BUILTIN_TYPE_STRING)])->withDescription('This is an enum.')->withReadable(true)->withWritable(true)->withReadableLink(true)->withWritableLink(true)->withOpenapiContext(['type' => 'string', 'enum' => ['one', 'two'], 'example' => 'one'])
181178
);
182179

183-
$operationPathResolver = new CustomOperationPathResolver(new OperationPathResolver(new UnderscorePathSegmentNameGenerator()));
184-
185180
$filterLocatorProphecy = $this->prophesize(ContainerInterface::class);
186181
$filters = [
187182
'f1' => new DummyFilter(['name' => [
@@ -238,7 +233,6 @@ public function testInvoke(): void
238233
$propertyMetadataFactory,
239234
$schemaFactory,
240235
$typeFactory,
241-
$operationPathResolver,
242236
$filterLocatorProphecy->reveal(),
243237
[],
244238
new Options('Test API', 'This is a test API.', '1.2.3', true, 'oauth2', 'authorizationCode', '/oauth/v2/token', '/oauth/v2/auth', '/oauth/v2/refresh', ['scope param'], [
@@ -259,6 +253,7 @@ public function testInvoke(): void
259253
'type' => 'object',
260254
'description' => 'This is a dummy',
261255
'externalDocs' => ['url' => 'http://schema.example.com/Dummy'],
256+
'deprecated' => false,
262257
'properties' => [
263258
'id' => new \ArrayObject([
264259
'type' => 'integer',

0 commit comments

Comments
 (0)