-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
527ddb9
commit 419e323
Showing
7 changed files
with
0 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,6 @@ public function test1(ApiTester $I) | |
public function test2(ApiTester $I) | ||
{ | ||
$I->wantTo('check response when making authenticated DELETE request to method'); | ||
$I->haveHttpHeader('Authorization', 'Bearer user1'); | ||
$I->sendDELETE('/method'); | ||
$I->seeResponseCodeIs(405); | ||
} | ||
|
@@ -29,7 +28,6 @@ public function test3(ApiTester $I) | |
public function test4(ApiTester $I) | ||
{ | ||
$I->wantTo('check response when making authenticated PATCH request to method'); | ||
$I->haveHttpHeader('Authorization', 'Bearer user1'); | ||
$I->sendPATCH('/method'); | ||
$I->seeResponseCodeIs(405); | ||
} | ||
|
@@ -51,7 +49,6 @@ public function test6(ApiTester $I, $scenario) | |
|
||
$I->wantTo('check response that verified AND unverified methods exist when making authenticated GET' | ||
. ' request for obtaining the methods of a user'); | ||
$I->haveHttpHeader('Authorization', 'Bearer user1'); | ||
$I->sendGET('/method'); | ||
$I->seeResponseCodeIs(200); | ||
|
||
|
@@ -71,7 +68,6 @@ public function test62(ApiTester $I) | |
{ | ||
$I->wantTo('check response for authenticated GET request to method for a user' | ||
. ' with auth_type=reset'); | ||
$I->haveHttpHeader('Authorization', 'Bearer user5'); | ||
$I->sendGET('/method'); | ||
$I->seeResponseCodeIs(403); | ||
} | ||
|
@@ -86,7 +82,6 @@ public function test7(ApiTester $I) | |
public function test8(ApiTester $I) | ||
{ | ||
$I->wantTo('check response when making authenticated POST request for creating a new method'); | ||
$I->haveHttpHeader('Authorization', 'Bearer user1'); | ||
$I->sendPOST('/method', ['type' => 'email','value' => '[email protected]']); | ||
$I->seeResponseCodeIs(200); | ||
$I->seeResponseContainsJson([ | ||
|
@@ -99,7 +94,6 @@ public function test82(ApiTester $I, $scenario) | |
{ | ||
$I->wantTo('check response when making authenticated POST request for creating an' | ||
. ' already existing method'); | ||
$I->haveHttpHeader('Authorization', 'Bearer user1'); | ||
$I->sendPOST('/method', ['type' => 'email','value' => '[email protected]']); | ||
|
||
$I->seeResponseCodeIs(200); | ||
|
@@ -109,7 +103,6 @@ public function test84(ApiTester $I) | |
{ | ||
$I->wantTo('check response for authenticated POST request to method for a user with' | ||
. ' auth_type=reset'); | ||
$I->haveHttpHeader('Authorization', 'Bearer user5'); | ||
$I->sendPOST('/method', ['type' => 'email','value' => '[email protected]']); | ||
$I->seeResponseCodeIs(403); | ||
} | ||
|
@@ -124,7 +117,6 @@ public function test9(ApiTester $I) | |
public function test10(ApiTester $I, $scenario) | ||
{ | ||
$I->wantTo('check response when making authenticated GET request to obtain a method'); | ||
$I->haveHttpHeader('Authorization', 'Bearer user1'); | ||
$I->sendGET('/method/22222222222222222222222222222222'); | ||
|
||
$I->seeResponseCodeIs(200); | ||
|
@@ -138,7 +130,6 @@ public function test102(ApiTester $I) | |
{ | ||
$I->wantTo('check response for authenticated GET request to method/{uid} for a user' | ||
. ' with auth_type=reset'); | ||
$I->haveHttpHeader('Authorization', 'Bearer user5'); | ||
$I->sendGET('/method/55555555555555555555555555555555'); | ||
$I->seeResponseCodeIs(403); | ||
} | ||
|
@@ -147,7 +138,6 @@ public function test11(ApiTester $I) | |
{ | ||
$I->wantTo('check response when making authenticated GET request to obtain a method as' | ||
. ' a non-owner of the method'); | ||
$I->haveHttpHeader('Authorization', 'Bearer user2'); | ||
$I->sendGET('/method/11111111111111111111111111111111'); | ||
$I->seeResponseCodeIs(404); | ||
} | ||
|
@@ -162,7 +152,6 @@ public function test12(ApiTester $I) | |
public function test13(ApiTester $I) | ||
{ | ||
$I->wantTo('check response when making authenticated POST request method/id'); | ||
$I->haveHttpHeader('Authorization', 'Bearer user1'); | ||
$I->sendPOST('/method/11111111111111111111111111111111'); | ||
$I->seeResponseCodeIs(405); | ||
} | ||
|
@@ -258,7 +247,6 @@ public function test17(ApiTester $I, $scenario) | |
*/ | ||
|
||
$I->wantTo('check response when making authenticated DELETE request to method/id'); | ||
$I->haveHttpHeader('Authorization', 'Bearer user1'); | ||
$I->sendDELETE('/method/33333333333333333333333333333335'); | ||
|
||
$I->seeResponseCodeIs(204); | ||
|
@@ -270,7 +258,6 @@ public function test172(ApiTester $I, $scenario) | |
{ | ||
$I->wantTo('check response when making authenticated DELETE request as a non-owner of' | ||
. ' the method'); | ||
$I->haveHttpHeader('Authorization', 'Bearer user2'); | ||
|
||
$I->sendDELETE('/method/11111111111111111111111111111111'); | ||
$I->seeResponseCodeIs(404); | ||
|
@@ -280,31 +267,27 @@ public function test174(ApiTester $I) | |
{ | ||
$I->wantTo('check response for authenticated DELETE request to method/{uid} for a user' | ||
. ' with auth_type=reset'); | ||
$I->haveHttpHeader('Authorization', 'Bearer user5'); | ||
$I->sendDELETE('/method/55555555555555555555555555555555'); | ||
$I->seeResponseCodeIs(403); | ||
} | ||
|
||
public function test18(ApiTester $I) | ||
{ | ||
$I->wantTo('check response when making authenticated PATCH request to method/id'); | ||
$I->haveHttpHeader('Authorization', 'Bearer user1'); | ||
$I->sendPATCH('/method/11111111111111111111111111111111'); | ||
$I->seeResponseCodeIs(405); | ||
} | ||
|
||
public function test19(ApiTester $I) | ||
{ | ||
$I->wantTo('check response when making authenticated OPTIONS request to method/id'); | ||
$I->haveHttpHeader('Authorization', 'Bearer user1'); | ||
$I->sendOPTIONS('/method/11111111111111111111111111111111'); | ||
$I->seeResponseCodeIs(200); | ||
} | ||
|
||
public function test20(ApiTester $I) | ||
{ | ||
$I->wantTo('check response when making PUT request to method/{uid}/resend with incorrect token'); | ||
$I->haveHttpHeader('Authorization', 'Bearer invalidToken'); | ||
$I->sendPUT('/method/11111111111111111111111111111111/resend'); | ||
$I->seeResponseCodeIs(401); | ||
} | ||
|
@@ -313,7 +296,6 @@ public function test21(ApiTester $I) | |
{ | ||
$I->wantTo('check response when making PUT request to method/{uid}/resend for a user' | ||
. ' with auth_type=reset'); | ||
$I->haveHttpHeader('Authorization', 'Bearer user5'); | ||
$I->sendPUT('/method/55555555555555555555555555555555/resend'); | ||
$I->seeResponseCodeIs(403); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.