From b62f4f11fedfb30b1a67c130319879e3db566617 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Sun, 11 Oct 2020 22:39:10 +0200 Subject: [PATCH 1/3] Update REST.php See https://github.com/Codeception/module-rest/pull/21#issuecomment-706748567 I hope the syntax (markdown) for links is correct. --- src/Codeception/Module/REST.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Codeception/Module/REST.php b/src/Codeception/Module/REST.php index 22efd6e..7c4699b 100644 --- a/src/Codeception/Module/REST.php +++ b/src/Codeception/Module/REST.php @@ -188,7 +188,8 @@ public function haveHttpHeader($name, $value) } /** - * Deletes a HTTP header, so that subsequent requests will not send it anymore. + * Deletes a HTTP header (that was originally added by [haveHttpHeader()](#haveHttpHeader)), + * so that subsequent requests will not send it anymore. * * Example: * ```php From 5fb434b4341910f6657dd45db5f536f511749d90 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Sun, 11 Oct 2020 22:48:44 +0200 Subject: [PATCH 2/3] Update REST.php As promised at https://github.com/Codeception/lib-innerbrowser/pull/15#issue-489251013 :-) --- src/Codeception/Module/REST.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Codeception/Module/REST.php b/src/Codeception/Module/REST.php index 7c4699b..7034971 100644 --- a/src/Codeception/Module/REST.php +++ b/src/Codeception/Module/REST.php @@ -430,6 +430,12 @@ public function amAWSAuthenticated($additionalAWSConfig = []) * 'tmp_name' => codecept_data_dir('sample_file.pdf') * ] * ]); + * // Some frameworks (e.g. Symfony) create field names in the form of an "array": `` + * // In this case you need to pass the fields like this: + * $I->sendPOST('/add-task', ['form' => [ + * 'task' => 'lorem ipsum', + * 'category' => 'miscellaneous', + * ]]); * ``` * * @param $url From 2b92dcf8c033cdc38bafe3ef3eb5ad33122d1d37 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Wed, 14 Oct 2020 18:14:59 +0200 Subject: [PATCH 3/3] Update REST.php --- src/Codeception/Module/REST.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Codeception/Module/REST.php b/src/Codeception/Module/REST.php index 7034971..42f87fc 100644 --- a/src/Codeception/Module/REST.php +++ b/src/Codeception/Module/REST.php @@ -430,8 +430,8 @@ public function amAWSAuthenticated($additionalAWSConfig = []) * 'tmp_name' => codecept_data_dir('sample_file.pdf') * ] * ]); - * // Some frameworks (e.g. Symfony) create field names in the form of an "array": `` - * // In this case you need to pass the fields like this: + * // If your field names contain square brackets (e.g. ``), + * // PHP parses them into an array. In this case you need to pass the fields like this: * $I->sendPOST('/add-task', ['form' => [ * 'task' => 'lorem ipsum', * 'category' => 'miscellaneous',