-
Notifications
You must be signed in to change notification settings - Fork 23
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
Simon Erkelens
committed
Aug 13, 2017
1 parent
0eb96da
commit 4e493b7
Showing
3 changed files
with
8 additions
and
4 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 |
---|---|---|
|
@@ -33,7 +33,8 @@ public function testResolveValid() | |
{ | ||
$createToken = Injector::inst()->get(CreateTokenMutationCreator::class); | ||
|
||
$response = $createToken->resolve(null, ['Email' => '[email protected]', 'Password' => 'error'], [], new ResolveInfo([])); | ||
$response = $createToken->resolve(null, ['Email' => '[email protected]', 'Password' => 'error'], [], | ||
new ResolveInfo([])); | ||
|
||
$this->assertTrue($response instanceof Member); | ||
$this->assertNotNull($response->Token); | ||
|
@@ -44,7 +45,8 @@ public function testResolveInvalidWithAllowedAnonymous() | |
Config::modify()->set(JWTAuthenticator::class, 'anonymous_allowed', true); | ||
$authenticator = Injector::inst()->get(CreateTokenMutationCreator::class); | ||
|
||
$response = $authenticator->resolve(null, ['Email' => '[email protected]', 'Password' => 'wrong'], [], new ResolveInfo([])); | ||
$response = $authenticator->resolve(null, ['Email' => '[email protected]', 'Password' => 'wrong'], [], | ||
new ResolveInfo([])); | ||
|
||
$this->assertTrue($response instanceof Member); | ||
$this->assertEquals(0, $response->ID); | ||
|
@@ -56,7 +58,8 @@ public function testResolveInvalidWithoutAllowedAnonymous() | |
Config::modify()->set(JWTAuthenticator::class, 'anonymous_allowed', false); | ||
$authenticator = Injector::inst()->get(CreateTokenMutationCreator::class); | ||
|
||
$response = $authenticator->resolve(null, ['Email' => '[email protected]', 'Password' => 'wrong'], [], new ResolveInfo([])); | ||
$response = $authenticator->resolve(null, ['Email' => '[email protected]', 'Password' => 'wrong'], [], | ||
new ResolveInfo([])); | ||
|
||
$this->assertTrue($response instanceof Member); | ||
$this->assertNull($response->Token); | ||
|