mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
Change tests to use validClient instead of getClientEntity
This commit is contained in:
@@ -175,7 +175,7 @@ class AbstractGrantTest extends TestCase
|
||||
public function testValidateClientMissingClientSecret()
|
||||
{
|
||||
$clientRepositoryMock = $this->getMockBuilder(ClientRepositoryInterface::class)->getMock();
|
||||
$clientRepositoryMock->method('getClientEntity')->willReturn(null);
|
||||
$clientRepositoryMock->method('validateClient')->willReturn(false);
|
||||
|
||||
/** @var AbstractGrant $grantMock */
|
||||
$grantMock = $this->getMockForAbstractClass(AbstractGrant::class);
|
||||
@@ -200,7 +200,7 @@ class AbstractGrantTest extends TestCase
|
||||
public function testValidateClientInvalidClientSecret()
|
||||
{
|
||||
$clientRepositoryMock = $this->getMockBuilder(ClientRepositoryInterface::class)->getMock();
|
||||
$clientRepositoryMock->method('getClientEntity')->willReturn(null);
|
||||
$clientRepositoryMock->method('validateClient')->willReturn(false);
|
||||
|
||||
/** @var AbstractGrant $grantMock */
|
||||
$grantMock = $this->getMockForAbstractClass(AbstractGrant::class);
|
||||
@@ -282,7 +282,7 @@ class AbstractGrantTest extends TestCase
|
||||
public function testValidateClientBadClient()
|
||||
{
|
||||
$clientRepositoryMock = $this->getMockBuilder(ClientRepositoryInterface::class)->getMock();
|
||||
$clientRepositoryMock->method('getClientEntity')->willReturn(null);
|
||||
$clientRepositoryMock->method('validateClient')->willReturn(false);
|
||||
|
||||
/** @var AbstractGrant $grantMock */
|
||||
$grantMock = $this->getMockForAbstractClass(AbstractGrant::class);
|
||||
|
Reference in New Issue
Block a user