public function GrantsTestMocked::testThatGrantsGetByUserId in Auth0 Single Sign On 8.2
Test that getByUserId adds an audience to the request.
Return value
void
Throws
\Exception Unsuccessful HTTP call.
File
- vendor/
auth0/ auth0-php/ tests/ API/ Management/ GrantsMockedTest.php, line 259
Class
- GrantsTestMocked
- Class GrantsTestMocked.
Namespace
Auth0\Tests\API\ManagementCode
public function testThatGrantsGetByUserId() {
$api = new MockManagementApi([
new Response(200),
]);
$api
->call()
->grants()
->getByUserId('__test_user_id__');
$this
->assertStringStartsWith('https://api.test.local/api/v2/grants', $api
->getHistoryUrl());
$this
->assertEquals('user_id=__test_user_id__', $api
->getHistoryQuery());
}