Google\Cloud\Tests\System\PubSub\PubSubTestCase::setUpBeforeClass PHP Method

setUpBeforeClass() public static method

public static setUpBeforeClass ( )
    public static function setUpBeforeClass()
    {
        if (self::$hasSetUp) {
            return;
        }
        $keyFilePath = getenv('GOOGLE_CLOUD_PHP_TESTS_KEY_PATH');
        self::$restClient = new PubSubClient(['keyFilePath' => $keyFilePath, 'transport' => 'rest']);
        self::$grpcClient = new PubSubClient(['keyFilePath' => $keyFilePath, 'transport' => 'grpc']);
        self::$hasSetUp = true;
    }