public function GrantsTestMocked::testGrantsGetAll in Auth0 Single Sign On 8.2
Test that getAll requests properly.
Return value
void
Throws
\Exception Unsuccessful HTTP call.
File
- vendor/
auth0/ auth0-php/ tests/ API/ Management/ GrantsMockedTest.php, line 55
Class
- GrantsTestMocked
- Class GrantsTestMocked.
Namespace
Auth0\Tests\API\ManagementCode
public function testGrantsGetAll() {
$api = new MockManagementApi([
new Response(200),
]);
$api
->call()
->grants()
->getAll();
$this
->assertEquals('GET', $api
->getHistoryMethod());
$this
->assertEquals('https://api.test.local/api/v2/grants', $api
->getHistoryUrl());
$this
->assertEmpty($api
->getHistoryQuery());
$headers = $api
->getHistoryHeaders();
$this
->assertEquals('Bearer __api_token__', $headers['Authorization'][0]);
$this
->assertEquals(self::$telemetry, $headers['Auth0-Client'][0]);
}