コード例 #1
0
ファイル: ScopeTest.php プロジェクト: basz/zfr-oauth2-server
 /**
  * @dataProvider providerReconstitute
  */
 public function testReconstitute($data)
 {
     $scope = Scope::reconstitute($data);
     $this->assertEquals($data['id'], $scope->getId());
     $this->assertSame($data['name'], $scope->getName());
     $this->assertSame($data['description'], $scope->getDescription());
     $this->assertEquals($data['isDefault'], $scope->isDefault());
 }
コード例 #2
0
 public function providerGenerateNewAccessToken()
 {
     return [[3600, $this->createMock(TokenOwnerInterface::class), $this->createMock(Client::class), ['read', 'write']], [3600, $this->createMock(TokenOwnerInterface::class), $this->createMock(Client::class), Scope::createNewScope(1, 'read')], [3600, null, null, null], [0, null, null, null]];
 }