Skip to content

Commit eecac09

Browse files
committed
Refactoring tests
1 parent a887c33 commit eecac09

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/src/Provider/AbstractProviderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ public function testDefaultPrepareAccessTokenResponse()
653653
$result = ['user_id' => uniqid()];
654654
$newResult = $provider->prepareAccessTokenResponse($result);
655655

656-
$this->assertTrue(isset($newResult['resource_owner_id']));
656+
$this->assertArrayHasKey('resource_owner_id', $newResult);
657657
$this->assertEquals($result['user_id'], $newResult['resource_owner_id']);
658658
}
659659

@@ -666,7 +666,7 @@ public function testPrepareAccessTokenResponseWithDotNotation()
666666
$result = ['user' => ['id' => uniqid()]];
667667
$newResult = $provider->prepareAccessTokenResponse($result);
668668

669-
$this->assertTrue(isset($newResult['resource_owner_id']));
669+
$this->assertArrayHasKey('resource_owner_id', $newResult);
670670
$this->assertEquals($result['user']['id'], $newResult['resource_owner_id']);
671671
}
672672

test/src/Token/AccessTokenTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public function testValues()
156156

157157
$values = $token->getValues();
158158

159-
$this->assertTrue(is_array($values));
159+
$this->assertInternalType('array', $values);
160160
$this->assertArrayHasKey('custom_thing', $values);
161161
$this->assertSame($options['custom_thing'], $values['custom_thing']);
162162
}

0 commit comments

Comments
 (0)