@@ -15,12 +15,14 @@ public function tearDown()
1515 public function testClientGetter ()
1616 {
1717 $ client = Mockery::mock ('PulkitJalan\Google\Client ' , [[]])->makePartial ();
18+
1819 $ this ->assertInstanceOf ('Google_Client ' , $ client ->getClient ());
1920 }
2021
2122 public function testServiceMake ()
2223 {
2324 $ client = Mockery::mock ('PulkitJalan\Google\Client ' , [[]])->makePartial ();
25+
2426 $ this ->assertInstanceOf ('Google_Service_Storage ' , $ client ->make ('storage ' ));
2527 }
2628
@@ -39,13 +41,21 @@ public function testMagicMethodException()
3941
4042 $ this ->setExpectedException ('BadMethodCallException ' );
4143
42- $ client ->getAuth2 ();
44+ $ client ->getAuthTest ();
45+ }
46+
47+ public function testDefaultAuth ()
48+ {
49+ $ client = new \PulkitJalan \Google \Client ([]);
50+
51+ $ this ->assertInstanceOf ('Google_Auth_OAuth2 ' , $ client ->getAuth ());
4352 }
4453
4554 public function testAssertCredentials ()
4655 {
4756 $ client = new \PulkitJalan \Google \Client ([
4857 'service ' => [
58+ 'enable ' => true ,
4959 'account ' => 'name ' ,
5060 'scopes ' => ['scope ' ],
5161 'key ' => __DIR__ .'/data/cert.p12 ' ,
@@ -58,7 +68,12 @@ public function testAssertCredentials()
5868 public function testAppEngineCredentials ()
5969 {
6070 $ _SERVER ['SERVER_SOFTWARE ' ] = 'Google App Engine ' ;
61- $ client = new \PulkitJalan \Google \Client ([]);
71+
72+ $ client = new \PulkitJalan \Google \Client ([
73+ 'service ' => [
74+ 'enable ' => true ,
75+ ],
76+ ]);
6277
6378 $ this ->assertInstanceOf ('Google_Auth_AppIdentity ' , $ client ->getAuth ());
6479
@@ -67,7 +82,11 @@ public function testAppEngineCredentials()
6782
6883 public function testComputeEngineCredentials ()
6984 {
70- $ client = new \PulkitJalan \Google \Client ([]);
85+ $ client = new \PulkitJalan \Google \Client ([
86+ 'service ' => [
87+ 'enable ' => true ,
88+ ],
89+ ]);
7190
7291 $ this ->assertInstanceOf ('Google_Auth_ComputeEngine ' , $ client ->getAuth ());
7392 }
0 commit comments