-
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #150 from maurobonfietti/v2.21.0
Version 2.21.0
- Loading branch information
Showing
5 changed files
with
29 additions
and
5 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
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 |
---|---|---|
|
@@ -364,6 +364,25 @@ public function testLoginUserFailed(): void | |
$this->assertStringNotContainsString('Bearer', $result); | ||
} | ||
|
||
/** | ||
* Test login endpoint with valid user but wrong password. | ||
*/ | ||
public function testLoginUserWithWrongPass(): void | ||
{ | ||
$response = $this->runApp('POST', '/login', ['email' => '[email protected]', 'password' => 'u2notKnowMe321']); | ||
|
||
$result = (string) $response->getBody(); | ||
|
||
$this->assertEquals(400, $response->getStatusCode()); | ||
$this->assertEquals('application/problem+json', $response->getHeaderLine('Content-Type')); | ||
$this->assertStringContainsString('Login failed', $result); | ||
$this->assertStringContainsString('Exception', $result); | ||
$this->assertStringContainsString('error', $result); | ||
$this->assertStringNotContainsString('success', $result); | ||
$this->assertStringNotContainsString('Authorization', $result); | ||
$this->assertStringNotContainsString('Bearer', $result); | ||
} | ||
|
||
/** | ||
* Test login endpoint without send required field email. | ||
*/ | ||
|