Skip to content

Commit

Permalink
Merge 186d66e into c3385d2
Browse files Browse the repository at this point in the history
  • Loading branch information
d0niek committed Mar 8, 2021
2 parents c3385d2 + 186d66e commit 075e9df
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions tests/OpenApi/Factory/OpenApiFactoryTest.php
Expand Up @@ -30,7 +30,6 @@
use ApiPlatform\Core\Metadata\Resource\ResourceNameCollection;
use ApiPlatform\Core\OpenApi\Factory\OpenApiFactory;
use ApiPlatform\Core\OpenApi\Model;
use ApiPlatform\Core\OpenApi\Model\PathItem;
use ApiPlatform\Core\OpenApi\OpenApi;
use ApiPlatform\Core\OpenApi\Options;
use ApiPlatform\Core\OpenApi\Serializer\OpenApiNormalizer;
Expand Down Expand Up @@ -749,17 +748,21 @@ public function testSubresourceDocumentation()

public function testResetPathItem()
{
$pathItem = new PathItem();
$pathItem->withGet(null);
$pathItem->withDelete(null);
$pathItem->withPost(null);
$pathItem->withPut(null);
$pathItem->withPatch(null);

$this->assertNull($pathItem->getGet());
$this->assertNull($pathItem->getDelete());
$this->assertNull($pathItem->getPost());
$this->assertNull($pathItem->getPut());
$this->assertNull($pathItem->getPatch());
$pathItem = new Model\PathItem(
null,
'',
'',
new Model\Operation(),
new Model\Operation(),
new Model\Operation(),
new Model\Operation(),
new Model\Operation()
);

$this->assertNull($pathItem->withGet(null)->getGet());
$this->assertNull($pathItem->withDelete(null)->getDelete());
$this->assertNull($pathItem->withPost(null)->getPost());
$this->assertNull($pathItem->withPut(null)->getPut());
$this->assertNull($pathItem->withPatch(null)->getPatch());
}
}

0 comments on commit 075e9df

Please sign in to comment.