Add setIsConfidential to client stub for tests

This commit is contained in:
Andrew Millington 2018-08-12 20:34:58 +01:00
parent 04807a1e2a
commit abef682031
No known key found for this signature in database
GPG Key ID: 077754CA23023F4F
2 changed files with 7 additions and 1 deletions

View File

@ -540,6 +540,7 @@ class AuthCodeGrantTest extends TestCase
$client = new ClientEntity(); $client = new ClientEntity();
$client->setIdentifier('foo'); $client->setIdentifier('foo');
$client->setRedirectUri('http://foo/bar'); $client->setRedirectUri('http://foo/bar');
$client->setIsConfidential();
$clientRepositoryMock = $this->getMockBuilder(ClientRepositoryInterface::class)->getMock(); $clientRepositoryMock = $this->getMockBuilder(ClientRepositoryInterface::class)->getMock();
$clientRepositoryMock->method('getClientEntity')->willReturn($client); $clientRepositoryMock->method('getClientEntity')->willReturn($client);
@ -629,7 +630,7 @@ class AuthCodeGrantTest extends TestCase
$this->getMockBuilder(RefreshTokenRepositoryInterface::class)->getMock(), $this->getMockBuilder(RefreshTokenRepositoryInterface::class)->getMock(),
new \DateInterval('PT10M') new \DateInterval('PT10M')
); );
$grant->setClientRepository($clientRepositoryMock); $grant->setClientRepository($clientRepositoryMock);
$grant->setScopeRepository($scopeRepositoryMock); $grant->setScopeRepository($scopeRepositoryMock);
$grant->setAccessTokenRepository($accessTokenRepositoryMock); $grant->setAccessTokenRepository($accessTokenRepositoryMock);

View File

@ -14,4 +14,9 @@ class ClientEntity implements ClientEntityInterface
{ {
$this->redirectUri = $uri; $this->redirectUri = $uri;
} }
public function setIsConfidential()
{
$this->isConfidential = true;
}
} }