/** * Test creating a \Google_Client */ public function testCreateClient() { $obj_client = \GDS\Gateway\GoogleAPIClient::createGoogleClient('test-app', '*****@*****.**', dirname(__FILE__) . '/base/test.p12'); $this->assertInstanceOf('\\Google_Client', $obj_client); $this->assertInstanceOf('\\Google_Auth_OAuth2', $obj_client->getAuth()); }
/** * Create a new MongoDB connection. * * @return \GDS\Gateway\GoogleAPIClient */ protected function createConnection() { // We'll need a Google_Client, use our convenience method $this->googleClient = \GDS\Gateway\GoogleAPIClient::createGoogleClient($this->config['appname'], $this->config['service_email'], base_path() . '/resources/assets/' . $this->config['key_file']); //THE GATEWAY TO USE $this->googleGateway = new \GDS\Gateway\GoogleAPIClient($this->googleClient, $this->config['project_id']); return $this->googleClient; }