Google\Cloud\Tests\ClientTraitStub::getProjectId PHP Method

getProjectId() public method

public getProjectId ( )
    public function getProjectId()
    {
        return $this->projectId;
    }

Usage Example

 public function testConfigureAuthenticationWithKeyFilePath()
 {
     $keyFilePath = __DIR__ . '/fixtures/json-key-fixture.json';
     $keyFile = json_decode(file_get_contents($keyFilePath), true);
     $trait = new ClientTraitStub();
     $conf = $trait->runConfigureAuthentication(['keyFilePath' => $keyFilePath]);
     $this->assertEquals($keyFile, $conf['keyFile']);
     $this->assertEquals('example_project', $trait->getProjectId());
 }