Auth0\Tests\AuthApiTest::testOauthToken PHP Method

testOauthToken() public method

public testOauthToken ( )
    public function testOauthToken()
    {
        $env = $this->getEnv();
        $api = new Authentication($env['DOMAIN'], $env['GLOBAL_CLIENT_ID'], $env['GLOBAL_CLIENT_SECRET']);
        $token = $api->get_access_token();
        $this->assertArrayHasKey('access_token', $token);
        $this->assertArrayHasKey('token_type', $token);
        $this->assertEquals('bearer', strtolower($token['token_type']));
    }