From f41e8d1c38587a02808164f5f14968eeabde8783 Mon Sep 17 00:00:00 2001 From: Bryce Mullican Date: Fri, 7 Aug 2015 09:48:51 -0500 Subject: [PATCH 1/2] added PATCH method to FormOpen.php --- src/AdamWathan/Form/Elements/FormOpen.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/AdamWathan/Form/Elements/FormOpen.php b/src/AdamWathan/Form/Elements/FormOpen.php index ac13354..4386975 100644 --- a/src/AdamWathan/Form/Elements/FormOpen.php +++ b/src/AdamWathan/Form/Elements/FormOpen.php @@ -54,6 +54,11 @@ public function put() return $this->setHiddenMethod('PUT'); } + public function patch() + { + return $this->setHiddenMethod('PATCH'); + } + public function delete() { return $this->setHiddenMethod('DELETE'); From cb69833b15096e623e4729e0a890d61dd9685557 Mon Sep 17 00:00:00 2001 From: Bryce Mullican Date: Fri, 7 Aug 2015 10:18:53 -0500 Subject: [PATCH 2/2] add in testRenderPatchFormOpen method to test patch method on FormOpen.php --- tests/FormOpenTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/FormOpenTest.php b/tests/FormOpenTest.php index 9fa1652..ba212e8 100644 --- a/tests/FormOpenTest.php +++ b/tests/FormOpenTest.php @@ -45,6 +45,15 @@ public function testRenderPutFormOpen() $this->assertEquals($expected, $result); } + public function testRenderPatchFormOpen() + { + $form = new FormOpen; + $expected = '
'; + $result = $form->patch()->render(); + + $this->assertEquals($expected, $result); + } + public function testRenderDeleteFormOpen() { $form = new FormOpen;