File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
src/AdamWathan/Form/Elements Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,11 @@ public function put()
54
54
return $ this ->setHiddenMethod ('PUT ' );
55
55
}
56
56
57
+ public function patch ()
58
+ {
59
+ return $ this ->setHiddenMethod ('PATCH ' );
60
+ }
61
+
57
62
public function delete ()
58
63
{
59
64
return $ this ->setHiddenMethod ('DELETE ' );
Original file line number Diff line number Diff line change @@ -45,6 +45,15 @@ public function testRenderPutFormOpen()
45
45
$ this ->assertEquals ($ expected , $ result );
46
46
}
47
47
48
+ public function testRenderPatchFormOpen ()
49
+ {
50
+ $ form = new FormOpen ;
51
+ $ expected = '<form method="POST" action=""><input type="hidden" name="_method" value="PATCH"> ' ;
52
+ $ result = $ form ->patch ()->render ();
53
+
54
+ $ this ->assertEquals ($ expected , $ result );
55
+ }
56
+
48
57
public function testRenderDeleteFormOpen ()
49
58
{
50
59
$ form = new FormOpen ;
You can’t perform that action at this time.
0 commit comments