File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 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 ;
33
34
use ApiPlatform \Core \OpenApi \OpenApi ;
34
35
use ApiPlatform \Core \OpenApi \Options ;
35
36
use ApiPlatform \Core \OpenApi \Serializer \OpenApiNormalizer ;
@@ -745,4 +746,20 @@ public function testSubresourceDocumentation()
745
746
$ normalizer = new OpenApiNormalizer ($ normalizers [0 ]);
746
747
$ normalizer ->normalize ($ openApi );
747
748
}
749
+
750
+ public function testResetPathItem ()
751
+ {
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 ());
764
+ }
748
765
}
You can’t perform that action at this time.
0 commit comments