Merge pull request #1969 from nelmio/TESTS

Fix the tests
This commit is contained in:
Guilhem Niot 2022-03-24 15:14:49 +01:00 committed by GitHub
commit 9cd417efb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -252,7 +252,8 @@ class ApiController80
/**
* @Route("/custom-operation-id", methods={"GET", "POST"})
*
* @Operation(operationId="custom-operation-id")
* @OA\Get(operationId="get-custom-operation-id")
* @OA\Post(operationId="post-custom-operation-id")
* @OA\Response(response=200, description="success")
*/
public function customOperationIdAction()

View File

@ -564,10 +564,10 @@ class FunctionalTest extends WebTestCase
public function testCustomOperationId()
{
$operation = $this->getOperation('/api/custom-operation-id', 'get');
$this->assertEquals('custom-operation-id', $operation->operationId);
$this->assertEquals('get-custom-operation-id', $operation->operationId);
$operation = $this->getOperation('/api/custom-operation-id', 'post');
$this->assertEquals('custom-operation-id', $operation->operationId);
$this->assertEquals('post-custom-operation-id', $operation->operationId);
}
/**

View File

@ -15,7 +15,7 @@ trait SetsContextTrait
// zircote/swagger-php ^3.2
\OpenApi\Analyser::$context = $context;
} else {
/// zircote/swagger-php ^4.0
// zircote/swagger-php ^4.0
\OpenApi\Generator::$context = $context;
}
}