@@ -48,20 +48,6 @@ public function testAuthCloudExplicitCommand()
4848 $ this ->assertContains ($ this ->bucketName , $ output );
4949 }
5050
51- public function testAuthCloudExplicitComputeEngineCommand ()
52- {
53- $ output = $ this ->runCommand (
54- 'auth-cloud-explicit-compute-engine ' , $ this ->projectId );
55- $ this ->assertContains ('Undefined index: access_token ' , $ output );
56- }
57-
58- public function testAuthCloudExplicitAppEngineCommand ()
59- {
60- $ output = $ this ->runCommand (
61- 'auth-cloud-explicit-app-engine ' , $ this ->projectId );
62- $ this ->assertContains ('Undefined index: access_token ' , $ output );
63- }
64-
6551 public function testAuthApiImplicitCommand ()
6652 {
6753 $ output = $ this ->runCommand ('auth-api-implicit ' , $ this ->projectId );
@@ -75,20 +61,6 @@ public function testAuthApiExplicitCommand()
7561 $ this ->assertContains ($ this ->bucketName , $ output );
7662 }
7763
78- public function testAuthApiExplicitComputeEngineCommand ()
79- {
80- $ output = $ this ->runCommand (
81- 'auth-api-explicit-compute-engine ' , $ this ->projectId );
82- $ this ->assertContains ('Invalid Credentials ' , $ output );
83- }
84-
85- public function testAuthApiExplicitAppEngineCommand ()
86- {
87- $ output = $ this ->runCommand (
88- 'auth-api-explicit-app-engine ' , $ this ->projectId );
89- $ this ->assertContains ('Invalid Credentials ' , $ output );
90- }
91-
9264 private function runCommand ($ commandName , $ projectId = null , $ serviceAccountPath =null )
9365 {
9466 $ application = require __DIR__ . '/../auth.php ' ;
@@ -100,20 +72,11 @@ private function runCommand($commandName, $projectId = null, $serviceAccountPath
10072 ]);
10173
10274 ob_start ();
103- try {
104- $ commandTester ->execute (
105- $ args ,
106- ['interactive ' => false ]
107- );
108- } catch (\Google \Cloud \Core \Exception \ServiceException $ e ) {
109- ob_get_clean ();
110- $ application ->renderException ($ e , $ commandTester ->getOutput ());
111- return $ commandTester ->getDisplay ();
112- } catch (\Google_Service_exception $ e ) {
113- ob_get_clean ();
114- $ application ->renderException ($ e , $ commandTester ->getOutput ());
115- return $ commandTester ->getDisplay ();
116- }
75+ $ commandTester ->execute (
76+ $ args ,
77+ ['interactive ' => false ]
78+ );
79+
11780 return ob_get_clean ();
11881 }
11982}
0 commit comments