Skip to content

Commit

Permalink
chore: address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vishwarajanand committed Jan 3, 2024
1 parent 039c115 commit f190489
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion BigQuery/tests/Unit/Connection/RestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function clientUniverseDomainConfigProvider()
[['apiEndpoint' => 'https://foobar.com'], 'https://foobar.com/bigquery/v2/'],
[['universeDomain' => 'googleapis.com'], 'https://bigquery.googleapis.com/bigquery/v2/'],
[['universeDomain' => 'abc.def.ghi'], 'https://bigquery.abc.def.ghi/bigquery/v2/'],
[['universeDomain' => ''], '', true],
[['universeDomain' => null], '', true],
];
}

Expand Down
2 changes: 1 addition & 1 deletion Core/src/RestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ private function getApiEndpoint($default, array $config, string $apiEndpointTemp
);
}

if (!isset($config['universeDomain']) || empty($config['universeDomain'])) {
if (!isset($config['universeDomain'])) {
throw new UnexpectedValueException(
'The "universeDomain" config value must be set to use the default API endpoint template.'
);
Expand Down
4 changes: 2 additions & 2 deletions Core/tests/Unit/RestTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ public function universeDomains()
[[], '', null, true],
[[], null, null, true],
[['universeDomain' => null], 'ab.cd', null, true],
[['universeDomain' => ''], 'ab.cd', null, true],
[['universeDomain' => 'defg'], 'ab.cd', 'ab.cd/'],
[['universeDomain' => ''], 'ab.cd/', 'ab.cd/'],
[['universeDomain' => 'defg'], '//ab.cd//', '//ab.cd//'],
[['universeDomain' => 'defg'], 'ab.UNIVERSE_DOMAIN.cd', 'ab.defg.cd/'],
];
}
Expand Down
2 changes: 1 addition & 1 deletion PubSub/tests/Unit/Connection/RestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function clientUniverseDomainConfigProvider()
[['apiEndpoint' => 'https://foobar.com'], 'https://foobar.com/'],
[['universeDomain' => 'googleapis.com'], 'https://pubsub.googleapis.com/'],
[['universeDomain' => 'abc.def.ghi'], 'https://pubsub.abc.def.ghi/'],
[['universeDomain' => ''], '', true],
[['universeDomain' => null], '', true],
];
}

Expand Down
2 changes: 1 addition & 1 deletion Storage/tests/Unit/Connection/RestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function clientUniverseDomainConfigProvider()
[['apiEndpoint' => 'https://foobar.com'], 'https://foobar.com/storage/v1/'],
[['universeDomain' => 'googleapis.com'], 'https://storage.googleapis.com/storage/v1/'],
[['universeDomain' => 'abc.def.ghi'], 'https://storage.abc.def.ghi/storage/v1/'],
[['universeDomain' => ''], '', true],
[['universeDomain' => null], '', true],
];
}

Expand Down

0 comments on commit f190489

Please sign in to comment.