Skip to content

Commit 7c7547b

Browse files
committed
always returning a project_id.
1 parent d9e1f15 commit 7c7547b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/SimpleTestCase.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ public static function setUpBeforeClass(): void {
2727
self::$test_bucket = 'gs://php-cloudfunctions';
2828
}
2929

30-
private static function get_project_id() {
31-
return shell_exec('gcloud config get-value project');
30+
private static function get_project_id(): string {
31+
$stdout = shell_exec('gcloud config get-value project');
32+
if ($stdout == null) {return 'unknown';}
33+
else {return $stdout;}
3234
}
3335

3436
public function test_on_https(): void {

0 commit comments

Comments
 (0)