public function testListFiles()
 {
     $file = $this->createTestFile();
     $fileRes = $this->restApi->insertFile($file);
     $response = $this->restApi->listFiles(['q' => "trashed=false and name='" . $fileRes['name'] . "'"]);
     $this->assertEquals($fileRes['name'], $response['files'][0]['name']);
 }
 protected function initApi($accessToken, $refreshToken)
 {
     $this->restApi->getApi()->setCredentials($accessToken, $refreshToken);
     $this->restApi->getApi()->setRefreshTokenCallback([$this, 'refreshTokenCallback']);
 }
 protected function initApi()
 {
     $this->googleDriveApi->getApi()->setCredentials($this->currAccount->getAccessToken(), $this->currAccount->getRefreshToken());
     $this->googleDriveApi->getApi()->setRefreshTokenCallback(array($this, 'refreshTokenCallback'));
 }