Google\Cloud\Tests\RequestWrapperTest::keyFileCredentialsProvider PHP Method

keyFileCredentialsProvider() public method

    public function keyFileCredentialsProvider()
    {
        $config = ['authHttpHandler' => function ($request, $options = []) {
            return new Response(200, [], json_encode(['access_token' => 'abc']));
        }, 'httpHandler' => function ($request, $options = []) {
            return new Response(200, []);
        }];
        $keyFilePath = __DIR__ . '/fixtures/json-key-fixture.json';
        return [[$config + ['keyFile' => json_decode(file_get_contents($keyFilePath), true)]], [$config + ['keyFilePath' => $keyFilePath]]];
    }