|
30 | 30 | use ApiPlatform\Core\Metadata\Resource\ResourceNameCollection;
|
31 | 31 | use ApiPlatform\Core\OpenApi\Factory\OpenApiFactory;
|
32 | 32 | use ApiPlatform\Core\OpenApi\Model;
|
33 |
| -use ApiPlatform\Core\OpenApi\Model\PathItem; |
34 | 33 | use ApiPlatform\Core\OpenApi\OpenApi;
|
35 | 34 | use ApiPlatform\Core\OpenApi\Options;
|
36 | 35 | use ApiPlatform\Core\OpenApi\Serializer\OpenApiNormalizer;
|
@@ -749,17 +748,21 @@ public function testSubresourceDocumentation()
|
749 | 748 |
|
750 | 749 | public function testResetPathItem()
|
751 | 750 | {
|
752 |
| - $pathItem = new PathItem(); |
753 |
| - $pathItem->withGet(null); |
754 |
| - $pathItem->withDelete(null); |
755 |
| - $pathItem->withPost(null); |
756 |
| - $pathItem->withPut(null); |
757 |
| - $pathItem->withPatch(null); |
758 |
| - |
759 |
| - $this->assertNull($pathItem->getGet()); |
760 |
| - $this->assertNull($pathItem->getDelete()); |
761 |
| - $this->assertNull($pathItem->getPost()); |
762 |
| - $this->assertNull($pathItem->getPut()); |
763 |
| - $this->assertNull($pathItem->getPatch()); |
| 751 | + $pathItem = new Model\PathItem( |
| 752 | + null, |
| 753 | + '', |
| 754 | + '', |
| 755 | + new Model\Operation(), |
| 756 | + new Model\Operation(), |
| 757 | + new Model\Operation(), |
| 758 | + new Model\Operation(), |
| 759 | + new Model\Operation() |
| 760 | + ); |
| 761 | + |
| 762 | + $this->assertNull($pathItem->withGet(null)->getGet()); |
| 763 | + $this->assertNull($pathItem->withDelete(null)->getDelete()); |
| 764 | + $this->assertNull($pathItem->withPost(null)->getPost()); |
| 765 | + $this->assertNull($pathItem->withPut(null)->getPut()); |
| 766 | + $this->assertNull($pathItem->withPatch(null)->getPatch()); |
764 | 767 | }
|
765 | 768 | }
|
0 commit comments