From 5c7f2f17f9c471d306955df457c7cab4e5c6ed3b Mon Sep 17 00:00:00 2001 From: Snap Date: Thu, 16 Apr 2015 14:51:26 -0700 Subject: Google's OpenID Connect method $google_client_id & $google_client_secret must be added to db.inc.php! --- .../tests/urlshortener/UrlShortenerTests.php | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 includes/google-api-php-client-master/tests/urlshortener/UrlShortenerTests.php (limited to 'includes/google-api-php-client-master/tests/urlshortener') diff --git a/includes/google-api-php-client-master/tests/urlshortener/UrlShortenerTests.php b/includes/google-api-php-client-master/tests/urlshortener/UrlShortenerTests.php new file mode 100644 index 0000000..08422bc --- /dev/null +++ b/includes/google-api-php-client-master/tests/urlshortener/UrlShortenerTests.php @@ -0,0 +1,46 @@ +service = new Google_Service_Urlshortener($this->getClient()); + } + + public function testUrlShort() + { + $url = new Google_Service_Urlshortener_Url(); + $url->longUrl = "http://google.com"; + + $shortUrl = $this->service->url->insert($url); + $this->assertEquals('urlshortener#url', $shortUrl['kind']); + $this->assertEquals('http://google.com/', $shortUrl['longUrl']); + } + + public function testEmptyJsonResponse() + { + $optParams = array('fields' => ''); + $resp = $this->service->url->get('http://goo.gl/KkHq8', $optParams); + + $this->assertEquals("", $resp->longUrl); + } +} -- cgit v1.2.3