class ClientRepositoryTest extends TestCase
{ private ClientRepository
$clientRepository;
private Connection&MockObject
$connection;
protected function setUp(): void
{ parent::
setUp();
$this->connection =
$this->
createMock(Connection::
class);
$this->clientRepository =
new ClientRepository($this->connection
);
} public function testValidateClientWithInvalidGrantTypeThrowException(): void
{ static::
expectExceptionMessage('The authorization grant type is not supported by the authorization server.'
);
$this->clientRepository->
validateClient('clientIdentifier', 'clientSecret', 'unsupportGrantType'
);
} /**
* @dataProvider validateClientDataProvider
*
* @param string $clientIdentifier
*/