@@ -32,20 +32,20 @@ public function setUp()
3232 $ this ->markTestSkipped ('Set the GOOGLE_APPLICATION_CREDENTIALS ' .
3333 'environment variable ' );
3434 }
35- $ this ->bucketName = getenv ('GCS_BUCKET_NAME ' );
35+ $ this ->bucketName = getenv ('GOOGLE_STORAGE_BUCKET ' );
3636 $ this ->projectId = getenv ('GCLOUD_PROJECT ' );
3737 }
3838
3939 public function testAuthCloudImplicitCommand ()
4040 {
41- $ output = $ this ->runCommand ('auth-cloud-implicit ' );
41+ $ output = $ this ->runCommand ('auth-cloud-implicit ' , null , $ this -> projectId );
4242 $ this ->assertContains ($ this ->bucketName , $ output );
4343 }
4444
4545 public function testAuthCloudExplicitCommand ()
4646 {
4747 $ serviceAccountPath = getenv ('GOOGLE_APPLICATION_CREDENTIALS ' );
48- $ output = $ this ->runCommand ('auth-cloud-explicit ' , $ serviceAccountPath );
48+ $ output = $ this ->runCommand ('auth-cloud-explicit ' , $ serviceAccountPath, $ this -> projectId );
4949 $ this ->assertContains ($ this ->bucketName , $ output );
5050 }
5151
@@ -97,7 +97,7 @@ private function runCommand($commandName, $serviceAccountPath=null, $projectId=n
9797 $ commandTester = new CommandTester ($ command );
9898
9999 ob_start ();
100- if ($ serviceAccountPath and $ projectId ) {
100+ if ($ serviceAccountPath ) {
101101 try {
102102 $ commandTester ->execute (
103103 [
@@ -111,13 +111,6 @@ private function runCommand($commandName, $serviceAccountPath=null, $projectId=n
111111 $ application ->renderException ($ e , $ commandTester ->getOutput ());
112112 return $ commandTester ->getDisplay ();
113113 }
114- } else if ($ serviceAccountPath ) {
115- $ commandTester ->execute (
116- [
117- 'serviceAccountPath ' => $ serviceAccountPath
118- ],
119- ['interactive ' => false ]
120- );
121114 } else if ($ projectId ) {
122115 try {
123116 $ commandTester ->execute (
0 commit comments