AugmentParameterTest.php 555 B

1234567891011121314151617
  1. <?php declare(strict_types=1);
  2. /**
  3. * @license Apache 2.0
  4. */
  5. namespace OpenApiTests;
  6. class AugmentParameterTest extends OpenApiTestCase
  7. {
  8. public function testAugmentParameter()
  9. {
  10. $openapi = \OpenApi\scan(__DIR__.'/Fixtures/UsingRefs.php');
  11. $this->assertCount(1, $openapi->components->parameters, 'OpenApi contains 1 reusable parameter specification');
  12. $this->assertEquals('ItemName', $openapi->components->parameters[0]->parameter, 'When no @OA\Parameter()->parameter is specified, use @OA\Parameter()->name');
  13. }
  14. }