Skip to content

Commit e4a6af6

Browse files
authored
Merge pull request #28 from ThomasLandauer/patch-2
Changing function names to camelCase, e.g. `sendPOST` => `sendPost`
2 parents e3d6e9f + d92c032 commit e4a6af6

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/Codeception/Module/REST.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,10 @@ public function haveHttpHeader($name, $value)
195195
* ```php
196196
* <?php
197197
* $I->haveHttpHeader('X-Requested-With', 'Codeception');
198-
* $I->sendGET('test-headers.php');
198+
* $I->sendGet('test-headers.php');
199199
* // ...
200200
* $I->deleteHeader('X-Requested-With');
201-
* $I->sendPOST('some-other-page.php');
201+
* $I->sendPost('some-other-page.php');
202202
* ?>
203203
* ```
204204
*
@@ -417,11 +417,11 @@ public function amAWSAuthenticated($additionalAWSConfig = [])
417417
* ```php
418418
* <?php
419419
* //simple POST call
420-
* $I->sendPOST('/message', ['subject' => 'Read this!', 'to' => 'johndoe@example.com']);
420+
* $I->sendPost('/message', ['subject' => 'Read this!', 'to' => 'johndoe@example.com']);
421421
* //simple upload method
422-
* $I->sendPOST('/message/24', ['inline' => 0], ['attachmentFile' => codecept_data_dir('sample_file.pdf')]);
422+
* $I->sendPost('/message/24', ['inline' => 0], ['attachmentFile' => codecept_data_dir('sample_file.pdf')]);
423423
* //uploading a file with a custom name and mime-type. This is also useful to simulate upload errors.
424-
* $I->sendPOST('/message/24', ['inline' => 0], [
424+
* $I->sendPost('/message/24', ['inline' => 0], [
425425
* 'attachmentFile' => [
426426
* 'name' => 'document.pdf',
427427
* 'type' => 'application/pdf',
@@ -432,7 +432,7 @@ public function amAWSAuthenticated($additionalAWSConfig = [])
432432
* ]);
433433
* // If your field names contain square brackets (e.g. `<input type="text" name="form[task]">`),
434434
* // PHP parses them into an array. In this case you need to pass the fields like this:
435-
* $I->sendPOST('/add-task', ['form' => [
435+
* $I->sendPost('/add-task', ['form' => [
436436
* 'task' => 'lorem ipsum',
437437
* 'category' => 'miscellaneous',
438438
* ]]);
@@ -449,7 +449,7 @@ public function amAWSAuthenticated($additionalAWSConfig = [])
449449
* @part json
450450
* @part xml
451451
*/
452-
public function sendPOST($url, $params = [], $files = [])
452+
public function sendPost($url, $params = [], $files = [])
453453
{
454454
$this->execute('POST', $url, $params, $files);
455455
}
@@ -462,7 +462,7 @@ public function sendPOST($url, $params = [], $files = [])
462462
* @part json
463463
* @part xml
464464
*/
465-
public function sendHEAD($url, $params = [])
465+
public function sendHead($url, $params = [])
466466
{
467467
$this->execute('HEAD', $url, $params);
468468
}
@@ -475,7 +475,7 @@ public function sendHEAD($url, $params = [])
475475
* @part json
476476
* @part xml
477477
*/
478-
public function sendOPTIONS($url, $params = [])
478+
public function sendOptions($url, $params = [])
479479
{
480480
$this->execute('OPTIONS', $url, $params);
481481
}
@@ -488,7 +488,7 @@ public function sendOPTIONS($url, $params = [])
488488
* @part json
489489
* @part xml
490490
*/
491-
public function sendGET($url, $params = [])
491+
public function sendGet($url, $params = [])
492492
{
493493
$this->execute('GET', $url, $params);
494494
}
@@ -502,7 +502,7 @@ public function sendGET($url, $params = [])
502502
* @part json
503503
* @part xml
504504
*/
505-
public function sendPUT($url, $params = [], $files = [])
505+
public function sendPut($url, $params = [], $files = [])
506506
{
507507
$this->execute('PUT', $url, $params, $files);
508508
}
@@ -516,7 +516,7 @@ public function sendPUT($url, $params = [], $files = [])
516516
* @part json
517517
* @part xml
518518
*/
519-
public function sendPATCH($url, $params = [], $files = [])
519+
public function sendPatch($url, $params = [], $files = [])
520520
{
521521
$this->execute('PATCH', $url, $params, $files);
522522
}
@@ -530,7 +530,7 @@ public function sendPATCH($url, $params = [], $files = [])
530530
* @part json
531531
* @part xml
532532
*/
533-
public function sendDELETE($url, $params = [], $files = [])
533+
public function sendDelete($url, $params = [], $files = [])
534534
{
535535
$this->execute('DELETE', $url, $params, $files);
536536
}
@@ -576,7 +576,7 @@ private function setHeaderLink(array $linkEntries)
576576
* @part json
577577
* @part xml
578578
*/
579-
public function sendLINK($url, array $linkEntries)
579+
public function sendLink($url, array $linkEntries)
580580
{
581581
$this->setHeaderLink($linkEntries);
582582
$this->execute('LINK', $url);
@@ -592,7 +592,7 @@ public function sendLINK($url, array $linkEntries)
592592
* @part json
593593
* @part xml
594594
*/
595-
public function sendUNLINK($url, array $linkEntries)
595+
public function sendUnlink($url, array $linkEntries)
596596
{
597597
$this->setHeaderLink($linkEntries);
598598
$this->execute('UNLINK', $url);
@@ -943,7 +943,7 @@ protected function decodeAndValidateJson($jsonString, $errorFormat="Invalid json
943943
* ``` php
944944
* <?php
945945
* $user_id = $I->grabResponse();
946-
* $I->sendPUT('/user', array('id' => $user_id, 'name' => 'davert'));
946+
* $I->sendPut('/user', array('id' => $user_id, 'name' => 'davert'));
947947
* ?>
948948
* ```
949949
*
@@ -971,7 +971,7 @@ public function grabResponse()
971971
* <?php
972972
* // match the first `user.id` in json
973973
* $firstUserId = $I->grabDataFromResponseByJsonPath('$..users[0].id');
974-
* $I->sendPUT('/user', array('id' => $firstUserId[0], 'name' => 'davert'));
974+
* $I->sendPut('/user', array('id' => $firstUserId[0], 'name' => 'davert'));
975975
* ?>
976976
* ```
977977
*

0 commit comments

Comments
 (0)