Google\Cloud\Tests\ServiceBuilderTest::testBuildsClients PHP Method

testBuildsClients() public method

public testBuildsClients ( $serviceName, $expectedClient )
    public function testBuildsClients($serviceName, $expectedClient)
    {
        $serviceBuilder = new ServiceBuilder(['projectId' => 'myProject']);
        $config = ['projectId' => 'myProject', 'scopes' => ['somescope'], 'httpHandler' => function () {
            return;
        }];
        $globalConfigClient = $serviceBuilder->{$serviceName}();
        $localConfigClient = $serviceBuilder->{$serviceName}($config);
        $this->assertInstanceOf($expectedClient, $globalConfigClient);
        $this->assertInstanceOf($expectedClient, $localConfigClient);
    }