From f0402232003285f45b28e86e3cff63b888f86a72 Mon Sep 17 00:00:00 2001 From: Bertrand Dunogier Date: Mon, 19 Sep 2016 14:06:31 +0200 Subject: [PATCH] Made behat REST HTTP client use standard HTTP verbs --- .../Features/Context/RestClient/BuzzDriver.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eZ/Bundle/EzPublishRestBundle/Features/Context/RestClient/BuzzDriver.php b/eZ/Bundle/EzPublishRestBundle/Features/Context/RestClient/BuzzDriver.php index 2e54cc3ba48..b838f3bf67d 100644 --- a/eZ/Bundle/EzPublishRestBundle/Features/Context/RestClient/BuzzDriver.php +++ b/eZ/Bundle/EzPublishRestBundle/Features/Context/RestClient/BuzzDriver.php @@ -115,6 +115,10 @@ public function setResource($resource) */ public function setMethod($method) { + if (in_array(strtolower($method), ['publish', 'patch', 'move', 'swap'])) { + $this->getRequest()->addHeader("X-HTTP-Method-Override: $method"); + $method = 'POST'; + } $this->getRequest()->setMethod($method); }