Skip to content
Browse files

Add unit tests for all methods for the Picasa API.

  • Loading branch information...
1 parent 04ac820 commit 00e562da16a29f14ab220111c0ceb443fa5b0bd5 @aaronschmitz aaronschmitz committed with LouisLandry
View
4 libraries/joomla/google/data/picasa/album.php
@@ -398,8 +398,8 @@ public function upload($file, $title = '', $summary = '')
$post .= "Content-Type: {$type}\n\n";
$post .= $data;
- $jdata = $this->auth->query($this->getLink(), $data, array('GData-Version' => 2, 'Content-Type: multipart/related'), 'post');
- return $this->safeXML($jdata->body);
+ $jdata = $this->auth->query($this->getLink(), $post, array('GData-Version' => 2, 'Content-Type: multipart/related'), 'post');
+ return new JGoogleDataPicasaPhoto($this->safeXML($jdata->body), $this->options, $this->auth);
}
else
{
View
17 libraries/joomla/google/data/picasa/photo.php
@@ -172,7 +172,7 @@ public function getTitle()
*/
public function getSummary()
{
- return (string) $this->xml->children('gphoto', true)->access;
+ return (string) $this->xml->children()->summary;
}
/**
@@ -266,6 +266,21 @@ public function setSummary($summary)
}
/**
+ * Method to set the access level of the photo
+ *
+ * @param string $access New photo access level
+ *
+ * @return JGoogleDataPicasaPhoto The object for method chaining
+ *
+ * @since 1234
+ */
+ public function setAccess($access)
+ {
+ $this->xml->children('gphoto', true)->access = $access;
+ return $this;
+ }
+
+ /**
* Method to set the time of the photo
*
* @param int $time New photo time
View
385 tests/suites/unit/joomla/google/JGoogleDataPicasaAlbumTest.php
@@ -0,0 +1,385 @@
+<?php
+/**
+ * @package Joomla.UnitTest
+ *
+ * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE
+ */
+
+require_once JPATH_PLATFORM . '/joomla/google/data/picasa.php';
+
+/**
+ * Test class for JGoogleDataPicasa.
+ *
+ * @package Joomla.UnitTest
+ * @subpackage Google
+ * @since 12.2
+ */
+class JGoogleDataPicasaAlbumTest extends PHPUnit_Framework_TestCase
+{
+ /**
+ * @var JRegistry Options for the JOauthV2client object.
+ */
+ protected $options;
+
+ /**
+ * @var JHttp Mock client object.
+ */
+ protected $client;
+
+ /**
+ * @var JInput The input object to use in retrieving GET/POST data.
+ */
+ protected $input;
+
+ /**
+ * @var JOauthV2client The OAuth client for sending requests to Google.
+ */
+ protected $oauth;
+
+ /**
+ * @var JGoogleAuthOauth2 The Google OAuth client for sending requests.
+ */
+ protected $auth;
+
+ /**
+ * @var string The XML data for the album.
+ */
+ protected $xml;
+
+ /**
+ * @var JGoogleDataPicasaAlbum Object under test.
+ */
+ protected $object;
+
+ /**
+ * Sets up the fixture, for example, opens a network connection.
+ * This method is called before a test is executed.
+ *
+ * @access protected
+ * @return void
+ */
+ protected function setUp()
+ {
+ $this->options = new JRegistry;
+ $this->http = $this->getMock('JOauthHttp', array('head', 'get', 'delete', 'trace', 'post', 'put', 'patch'), array($this->options));
+ $this->input = new JInput;
+ $this->oauth = new JOauthV2client($this->options, $this->http, $this->input);
+ $this->auth = new JGoogleAuthOauth2($this->options, $this->oauth);
+ $this->xml = new SimpleXMLElement(JFile::read(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'album.txt'));
+ $this->object = new JGoogleDataPicasaAlbum($this->xml, $this->options, $this->auth);
+
+ $this->object->setOption('clientid', '01234567891011.apps.googleusercontent.com');
+ $this->object->setOption('clientsecret', 'jeDs8rKw_jDJW8MMf-ff8ejs');
+ $this->object->setOption('redirecturi', 'http://localhost/oauth');
+
+ $token['access_token'] = 'accessvalue';
+ $token['refresh_token'] = 'refreshvalue';
+ $token['created'] = time() - 1800;
+ $token['expires_in'] = 3600;
+ $this->oauth->setToken($token);
+ }
+
+ /**
+ * Tears down the fixture, for example, closes a network connection.
+ * This method is called after a test is executed.
+ *
+ * @access protected
+ * @return void
+ */
+ protected function tearDown()
+ {
+ }
+
+ /**
+ * Tests the auth method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testAuth()
+ {
+ $this->assertEquals($this->auth->auth(), $this->object->auth());
+ }
+
+ /**
+ * Tests the isauth method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testIsAuth()
+ {
+ $this->assertEquals($this->auth->isAuth(), $this->object->authenticated());
+ }
+
+ /**
+ * Tests the delete method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testDelete()
+ {
+ $this->http->expects($this->once())->method('delete')->will($this->returnCallback('emptyPicasaCallback'));
+ $results = $this->object->delete();
+ $this->assertEquals($results, true);
+ }
+
+ /**
+ * Tests the getLink method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testGetLink()
+ {
+ $link = $this->object->getLink();
+ $this->assertEquals($link, 'https://picasaweb.google.com/data/entry/api/user/12345678901234567890/albumid/0123456789012345678');
+ $link = $this->object->getLink('self');
+ $this->assertEquals($link, 'https://picasaweb.google.com/data/entry/api/user/12345678901234567890/albumid/0123456789012345678');
+ }
+
+ /**
+ * Tests the getTitle method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testGetTitle()
+ {
+ $title = $this->object->getTitle();
+ $this->assertEquals($title, 'Album 2');
+ }
+
+ /**
+ * Tests the getSummary method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testGetSummary()
+ {
+ $summary = $this->object->getSummary();
+ $this->assertEquals($summary, 'Summary');
+ }
+
+ /**
+ * Tests the getLocation method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testGetLocation()
+ {
+ $location = $this->object->getLocation();
+ $this->assertEquals($location, 'California');
+ }
+
+ /**
+ * Tests the getAccess method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testGetAccess()
+ {
+ $access = $this->object->getAccess();
+ $this->assertEquals($access, 'protected');
+ }
+
+ /**
+ * Tests the getTime method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testGetTime()
+ {
+ $time = $this->object->getTime();
+ $this->assertEquals($time, 1293843600000);
+ }
+
+ /**
+ * Tests the setTitle method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testSetTitle()
+ {
+ $title = $this->object->setTitle('New Title')->getTitle();
+ $this->assertEquals($title, 'New Title');
+ }
+
+ /**
+ * Tests the setSummary method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testSetSummary()
+ {
+ $summary = $this->object->setSummary('New Summary')->getSummary();
+ $this->assertEquals($summary, 'New Summary');
+ }
+
+ /**
+ * Tests the setLocation method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testSetLocation()
+ {
+ $location = $this->object->setLocation('San Francisco')->getLocation();
+ $this->assertEquals($location, 'San Francisco');
+ }
+
+ /**
+ * Tests the setAccess method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testSetAccess()
+ {
+ $access = $this->object->setAccess('public')->getAccess();
+ $this->assertEquals($access, 'public');
+ }
+
+ /**
+ * Tests the setTime method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testSetTime()
+ {
+ $time = $this->object->setTime(1293843600001)->getTime();
+ $this->assertEquals($time, 1293843600001);
+ }
+
+ /**
+ * Tests the save method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testSave()
+ {
+ $this->http->expects($this->exactly(2))->method('put')->will($this->returnCallback('XMLDataPicasaAlbumCallback'));
+ $this->object->setTitle('New Title');
+ $this->object->save();
+ $this->object->save(true);
+ }
+
+ /**
+ * Tests the refresh method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testRefresh()
+ {
+ $this->http->expects($this->once())->method('get')->will($this->returnCallback('XMLPicasaAlbumCallback'));
+ $result = $this->object->refresh();
+ $this->assertEquals(get_class($result), 'JGoogleDataPicasaAlbum');
+ }
+
+ /**
+ * Tests the listPhotos method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testListPhotos()
+ {
+ $this->http->expects($this->once())->method('get')->will($this->returnCallback('XMLPicasaPhotolistCallback'));
+ $results = $this->object->listPhotos();
+
+ $this->assertEquals(count($results), 2);
+ $i = 1;
+ foreach ($results as $result)
+ {
+ $this->assertEquals(get_class($result), 'JGoogleDataPicasaPhoto');
+ $this->assertEquals($result->getTitle(), 'Photo' . $i . '.jpg');
+ $i++;
+ }
+ }
+
+ /**
+ * Tests the listPhotos method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testUpload()
+ {
+ $this->http->expects($this->once())->method('post')->will($this->returnCallback('XMLDataPicasaUploadCallback'));
+ $result = $this->object->upload(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'logo.png');
+
+ $this->assertEquals(get_class($result), 'JGoogleDataPicasaPhoto');
+ }
+}
+
+/**
+ * Dummy method
+ *
+ * @param string $url Path to the resource.
+ * @param array $headers An array of name-value pairs to include in the header of the request.
+ * @param integer $timeout Read timeout in seconds.
+ *
+ * @return JHttpResponse
+ *
+ * @since 12.2
+ */
+function emptyPicasaCallback($url, array $headers = null, $timeout = null)
+{
+ $response->code = 200;
+ $response->headers = array('Content-Type' => 'text/html');
+ $response->body = '';
+
+ return $response;
+}
+
+/**
+ * Dummy method
+ *
+ * @param string $url Path to the resource.
+ * @param array $headers An array of name-value pairs to include in the header of the request.
+ * @param integer $timeout Read timeout in seconds.
+ *
+ * @return JHttpResponse
+ *
+ * @since 12.2
+ */
+function XMLPicasaPhotolistCallback($url, array $headers = null, $timeout = null)
+{
+ $response->code = 200;
+ $response->headers = array('Content-Type' => 'text/html');
+ $response->body = JFile::read(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'photolist.txt');
+
+ return $response;
+}
+
+/**
+ * Dummy method
+ *
+ * @param string $url Path to the resource.
+ * @param mixed $data Either an associative array or a string to be sent with the request.
+ * @param array $headers An array of name-value pairs to include in the header of the request.
+ * @param integer $timeout Read timeout in seconds.
+ *
+ * @return JHttpResponse
+ *
+ * @since 12.2
+ */
+function XMLDataPicasaUploadCallback($url, $data, array $headers = null, $timeout = null)
+{
+ $response->code = 200;
+ $response->headers = array('Content-Type' => 'text/html');
+ $response->body = JFile::read(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'photo.txt');
+
+ return $response;
+}
View
371 tests/suites/unit/joomla/google/JGoogleDataPicasaPhotoTest.php
@@ -0,0 +1,371 @@
+<?php
+/**
+ * @package Joomla.UnitTest
+ *
+ * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE
+ */
+
+require_once JPATH_PLATFORM . '/joomla/google/data/picasa.php';
+
+/**
+ * Test class for JGoogleDataPicasa.
+ *
+ * @package Joomla.UnitTest
+ * @subpackage Google
+ * @since 12.2
+ */
+class JGoogleDataPicasaPhotoTest extends PHPUnit_Framework_TestCase
+{
+ /**
+ * @var JRegistry Options for the JOauthV2client object.
+ */
+ protected $options;
+
+ /**
+ * @var JHttp Mock client object.
+ */
+ protected $client;
+
+ /**
+ * @var JInput The input object to use in retrieving GET/POST data.
+ */
+ protected $input;
+
+ /**
+ * @var JOauthV2client The OAuth client for sending requests to Google.
+ */
+ protected $oauth;
+
+ /**
+ * @var JGoogleAuthOauth2 The Google OAuth client for sending requests.
+ */
+ protected $auth;
+
+ /**
+ * @var string The XML data for the album.
+ */
+ protected $xml;
+
+ /**
+ * @var JGoogleDataPicasaPhoto Object under test.
+ */
+ protected $object;
+
+ /**
+ * Sets up the fixture, for example, opens a network connection.
+ * This method is called before a test is executed.
+ *
+ * @access protected
+ * @return void
+ */
+ protected function setUp()
+ {
+ $this->options = new JRegistry;
+ $this->http = $this->getMock('JOauthHttp', array('head', 'get', 'delete', 'trace', 'post', 'put', 'patch'), array($this->options));
+ $this->input = new JInput;
+ $this->oauth = new JOauthV2client($this->options, $this->http, $this->input);
+ $this->auth = new JGoogleAuthOauth2($this->options, $this->oauth);
+ $this->xml = new SimpleXMLElement(JFile::read(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'photo.txt'));
+ $this->object = new JGoogleDataPicasaPhoto($this->xml, $this->options, $this->auth);
+
+ $this->object->setOption('clientid', '01234567891011.apps.googleusercontent.com');
+ $this->object->setOption('clientsecret', 'jeDs8rKw_jDJW8MMf-ff8ejs');
+ $this->object->setOption('redirecturi', 'http://localhost/oauth');
+
+ $token['access_token'] = 'accessvalue';
+ $token['refresh_token'] = 'refreshvalue';
+ $token['created'] = time() - 1800;
+ $token['expires_in'] = 3600;
+ $this->oauth->setToken($token);
+ }
+
+ /**
+ * Tears down the fixture, for example, closes a network connection.
+ * This method is called after a test is executed.
+ *
+ * @access protected
+ * @return void
+ */
+ protected function tearDown()
+ {
+ }
+
+ /**
+ * Tests the auth method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testAuth()
+ {
+ $this->assertEquals($this->auth->auth(), $this->object->auth());
+ }
+
+ /**
+ * Tests the isauth method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testIsAuth()
+ {
+ $this->assertEquals($this->auth->isAuth(), $this->object->authenticated());
+ }
+
+ /**
+ * Tests the delete method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testDelete()
+ {
+ $this->http->expects($this->once())->method('delete')->will($this->returnCallback('emptyPicasaCallback'));
+ $results = $this->object->delete();
+ $this->assertEquals($results, true);
+ }
+
+ /**
+ * Tests the getLink method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testGetLink()
+ {
+ $link = $this->object->getLink();
+ $this->assertEquals($link, 'https://picasaweb.google.com/data/entry/api/user/12345678901234567890/albumid/0123456789012345678/photoid/12345678901234567890');
+ $link = $this->object->getLink('self');
+ $this->assertEquals($link, 'https://picasaweb.google.com/data/entry/api/user/12345678901234567890/albumid/0123456789012345678/photoid/12345678901234567890');
+ }
+
+ /**
+ * Tests the getURL method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testGetURL()
+ {
+ $url = $this->object->getURL();
+ $this->assertEquals($url, 'https://lh3.googleusercontent.com/-VQfLCrQyGuw/UAYBmwBJZ3I/AAAAAAAAF-k/8y_1iBPJcdQ/Photo2.jpg');
+ }
+
+ /**
+ * Tests the getThumbnails method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testGetThumbnails()
+ {
+ $thumbs = $this->object->getThumbnails();
+ $valid[72] = array('url' => 'https://lh3.googleusercontent.com/sdgfdfgsdgf/werewr/aswertrt/vdfderer/s72/Photo2.jpg', 'w' => 72, 'h' => 54);
+ $valid[144] = array('url' => 'https://lh3.googleusercontent.com/sdgfdfgsdgf/werewr/aswertrt/vdfderer/s144/Photo2.jpg', 'w' => 144, 'h' => 108);
+ $valid[288] = array('url' => 'https://lh3.googleusercontent.com/sdgfdfgsdgf/werewr/aswertrt/vdfderer/s288/Photo2.jpg', 'w' => 288, 'h' => 216);
+ $this->assertEquals($thumbs, $valid);
+ }
+
+ /**
+ * Tests the getTitle method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testGetTitle()
+ {
+ $title = $this->object->getTitle();
+ $this->assertEquals($title, 'Photo2.jpg');
+ }
+
+ /**
+ * Tests the getSummary method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testGetSummary()
+ {
+ $summary = $this->object->getSummary();
+ $this->assertEquals($summary, 'Summary');
+ }
+
+ /**
+ * Tests the getAccess method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testGetAccess()
+ {
+ $access = $this->object->getAccess();
+ $this->assertEquals($access, 'only_you');
+ }
+
+ /**
+ * Tests the getTime method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testGetTime()
+ {
+ $time = $this->object->getTime();
+ $this->assertEquals($time, 1328140800000);
+ }
+
+ /**
+ * Tests the getSize method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testGetSize()
+ {
+ $size = $this->object->getSize();
+ $this->assertEquals($size, 648818);
+ }
+
+ /**
+ * Tests the getHeight method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testGetHeight()
+ {
+ $height = $this->object->getHeight();
+ $this->assertEquals($height, 1536);
+ }
+
+ /**
+ * Tests the getTime method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testGetWidth()
+ {
+ $width = $this->object->getWidth();
+ $this->assertEquals($width, 2048);
+ }
+
+ /**
+ * Tests the setTitle method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testSetTitle()
+ {
+ $title = $this->object->setTitle('New Title')->getTitle();
+ $this->assertEquals($title, 'New Title');
+ }
+
+ /**
+ * Tests the setSummary method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testSetSummary()
+ {
+ $summary = $this->object->setSummary('New Summary')->getSummary();
+ $this->assertEquals($summary, 'New Summary');
+ }
+
+ /**
+ * Tests the setAccess method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testSetAccess()
+ {
+ $access = $this->object->setAccess('public')->getAccess();
+ $this->assertEquals($access, 'public');
+ }
+
+ /**
+ * Tests the getTime method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testSetTime()
+ {
+ $time = $this->object->setTime('FIX')->getTime();
+ $this->assertEquals($time, 0);
+ }
+
+ /**
+ * Tests the save method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testSave()
+ {
+ $this->http->expects($this->exactly(2))->method('put')->will($this->returnCallback('XMLDataPicasaPhotoCallback'));
+ $this->object->setTitle('New Title');
+ $this->object->save();
+ $this->object->save(true);
+ }
+
+ /**
+ * Tests the refresh method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testRefresh()
+ {
+ $this->http->expects($this->once())->method('get')->will($this->returnCallback('XMLPicasaPhotoCallback'));
+ $result = $this->object->refresh();
+ $this->assertEquals(get_class($result), 'JGoogleDataPicasaPhoto');
+ }
+}
+
+/**
+ * Dummy method
+ *
+ * @param string $url Path to the resource.
+ * @param array $headers An array of name-value pairs to include in the header of the request.
+ * @param integer $timeout Read timeout in seconds.
+ *
+ * @return JHttpResponse
+ *
+ * @since 12.2
+ */
+function XMLPicasaPhotoCallback($url, array $headers = null, $timeout = null)
+{
+ $response->code = 200;
+ $response->headers = array('Content-Type' => 'text/html');
+ $response->body = JFile::read(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'photo.txt');
+
+ return $response;
+}
+
+/**
+ * Dummy method
+ *
+ * @param string $url Path to the resource.
+ * @param mixed $data Either an associative array or a string to be sent with the request.
+ * @param array $headers An array of name-value pairs to include in the header of the request.
+ * @param integer $timeout Read timeout in seconds.
+ *
+ * @return JHttpResponse
+ *
+ * @since 12.2
+ */
+function XMLDataPicasaPhotoCallback($url, $data, array $headers = null, $timeout = null)
+{
+ PHPUnit_Framework_TestCase::assertContains('<title>New Title</title>', $data);
+
+ $response->code = 200;
+ $response->headers = array('Content-Type' => 'text/html');
+ $response->body = $data;
+
+ return $response;
+}
View
221 tests/suites/unit/joomla/google/JGoogleDataPicasaTest.php
@@ -0,0 +1,221 @@
+<?php
+/**
+ * @package Joomla.UnitTest
+ *
+ * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE
+ */
+
+require_once JPATH_PLATFORM . '/joomla/google/data/picasa.php';
+
+/**
+ * Test class for JGoogleDataPicasa.
+ *
+ * @package Joomla.UnitTest
+ * @subpackage Google
+ * @since 12.2
+ */
+class JGoogleDataPicasaTest extends PHPUnit_Framework_TestCase
+{
+ /**
+ * @var JRegistry Options for the JOauthV2client object.
+ */
+ protected $options;
+
+ /**
+ * @var JHttp Mock client object.
+ */
+ protected $client;
+
+ /**
+ * @var JInput The input object to use in retrieving GET/POST data.
+ */
+ protected $input;
+
+ /**
+ * @var JOauthV2client The OAuth client for sending requests to Google.
+ */
+ protected $oauth;
+
+ /**
+ * @var JGoogleAuthOauth2 The Google OAuth client for sending requests.
+ */
+ protected $auth;
+
+ /**
+ * @var JGoogleDataPicasa Object under test.
+ */
+ protected $object;
+
+ /**
+ * Sets up the fixture, for example, opens a network connection.
+ * This method is called before a test is executed.
+ *
+ * @access protected
+ * @return void
+ */
+ protected function setUp()
+ {
+ $this->options = new JRegistry;
+ $this->http = $this->getMock('JOauthHttp', array('head', 'get', 'delete', 'trace', 'post', 'put', 'patch'), array($this->options));
+ $this->input = new JInput;
+ $this->oauth = new JOauthV2client($this->options, $this->http, $this->input);
+ $this->auth = new JGoogleAuthOauth2($this->options, $this->oauth);
+ $this->object = new JGoogleDataPicasa($this->options, $this->auth);
+
+ $this->object->setOption('clientid', '01234567891011.apps.googleusercontent.com');
+ $this->object->setOption('clientsecret', 'jeDs8rKw_jDJW8MMf-ff8ejs');
+ $this->object->setOption('redirecturi', 'http://localhost/oauth');
+
+ $token['access_token'] = 'accessvalue';
+ $token['refresh_token'] = 'refreshvalue';
+ $token['created'] = time() - 1800;
+ $token['expires_in'] = 3600;
+ $this->oauth->setToken($token);
+ }
+
+ /**
+ * Tears down the fixture, for example, closes a network connection.
+ * This method is called after a test is executed.
+ *
+ * @access protected
+ * @return void
+ */
+ protected function tearDown()
+ {
+ }
+
+ /**
+ * Tests the auth method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testAuth()
+ {
+ $this->assertEquals($this->auth->auth(), $this->object->auth());
+ }
+
+ /**
+ * Tests the isauth method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testIsAuth()
+ {
+ $this->assertEquals($this->auth->isAuth(), $this->object->authenticated());
+ }
+
+ /**
+ * Tests the listAlbums method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testListAlbums()
+ {
+ $this->http->expects($this->once())->method('get')->will($this->returnCallback('XMLPicasaAlbumlistCallback'));
+ $results = $this->object->listAlbums('userID');
+
+ $this->assertEquals(count($results), 2);
+ $i = 1;
+ foreach ($results as $result)
+ {
+ $this->assertEquals(get_class($result), 'JGoogleDataPicasaAlbum');
+ $this->assertEquals($result->getTitle(), 'Album ' .$i);
+ $i++;
+ }
+ }
+
+ /**
+ * Tests the createAlbum method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testCreateAlbum()
+ {
+ $this->http->expects($this->once())->method('post')->will($this->returnCallback('XMLDataPicasaAlbumCallback'));
+ $result = $this->object->createAlbum('userID', 'New Title', 'private');
+ $this->assertEquals(get_class($result), 'JGoogleDataPicasaAlbum');
+ $this->assertEquals($result->getTitle(), 'New Title');
+ }
+
+ /**
+ * Tests the getAlbum method
+ *
+ * @group JGoogle
+ * @return void
+ */
+ public function testGetAlbum()
+ {
+ $this->http->expects($this->once())->method('get')->will($this->returnCallback('XMLPicasaAlbumCallback'));
+ $result = $this->object->getAlbum('https://picasaweb.google.com/data/entry/api/user/12345678901234567890/albumid/0123456789012345678');
+ $this->assertEquals(get_class($result), 'JGoogleDataPicasaAlbum');
+ $this->assertEquals($result->getTitle(), 'Album 2');
+ }
+}
+
+/**
+ * Dummy method
+ *
+ * @param string $url Path to the resource.
+ * @param array $headers An array of name-value pairs to include in the header of the request.
+ * @param integer $timeout Read timeout in seconds.
+ *
+ * @return JHttpResponse
+ *
+ * @since 12.2
+ */
+function XMLPicasaAlbumCallback($url, array $headers = null, $timeout = null)
+{
+ $response->code = 200;
+ $response->headers = array('Content-Type' => 'text/html');
+ $response->body = JFile::read(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'album.txt');
+
+ return $response;
+}
+
+/**
+ * Dummy method
+ *
+ * @param string $url Path to the resource.
+ * @param mixed $data Either an associative array or a string to be sent with the request.
+ * @param array $headers An array of name-value pairs to include in the header of the request.
+ * @param integer $timeout Read timeout in seconds.
+ *
+ * @return JHttpResponse
+ *
+ * @since 12.2
+ */
+function XMLDataPicasaAlbumCallback($url, $data, array $headers = null, $timeout = null)
+{
+ PHPUnit_Framework_TestCase::assertContains('<title>New Title</title>', $data);
+
+ $response->code = 200;
+ $response->headers = array('Content-Type' => 'text/html');
+ $response->body = $data;
+
+ return $response;
+}
+
+/**
+ * Dummy method
+ *
+ * @param string $url Path to the resource.
+ * @param array $headers An array of name-value pairs to include in the header of the request.
+ * @param integer $timeout Read timeout in seconds.
+ *
+ * @return JHttpResponse
+ *
+ * @since 12.2
+ */
+function XMLPicasaAlbumlistCallback($url, array $headers = null, $timeout = null)
+{
+ $response->code = 200;
+ $response->headers = array('Content-Type' => 'text/html');
+ $response->body = JFile::read(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'albumlist.txt');
+
+ return $response;
+}
View
39 tests/suites/unit/joomla/google/album.txt
@@ -0,0 +1,39 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<entry xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='abcdefghijklmnopqrstuvwxyz'>
+ <id>https://picasaweb.google.com/data/entry/user/12345678901234567890/albumid/0123456789012345678</id>
+ <published>2011-01-01T01:00:00.000Z</published>
+ <updated>2011-01-01T01:00:00.000Z</updated>
+ <app:edited>2011-01-01T01:00:00.000Z</app:edited>
+ <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/>
+ <title>Album 2</title>
+ <summary>Summary</summary>
+ <rights>protected</rights>
+ <link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/12345678901234567890/albumid/0123456789012345678'/>
+ <link rel='alternate' type='text/html' href='https://lh4.googleusercontent.com/BBBBBBBBBBBB/BBBBBBBBBBB/BBBBBBBBBBB/BBBBBBBBBBB/Album2.jpg?locked=true'/>
+ <link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/12345678901234567890/albumid/0123456789012345678'/>
+ <link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/12345678901234567890/albumid/0123456789012345678'/>
+ <link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/12345678901234567890/albumid/0123456789012345678/acl'/>
+ <author>
+ <name>Joomla</name>
+ <uri>https://picasaweb.google.com/12345678901234567890</uri>
+ </author>
+ <gphoto:id>0123456789012345678</gphoto:id>
+ <gphoto:name>Album2</gphoto:name>
+ <gphoto:location>California</gphoto:location>
+ <gphoto:access>protected</gphoto:access>
+ <gphoto:timestamp>1293843600000</gphoto:timestamp>
+ <gphoto:numphotos>1</gphoto:numphotos>
+ <gphoto:numphotosremaining>999</gphoto:numphotosremaining>
+ <gphoto:bytesUsed>1000</gphoto:bytesUsed>
+ <gphoto:user>12345678901234567890</gphoto:user>
+ <gphoto:nickname>Joomla</gphoto:nickname>
+ <gphoto:organization name='Joomla'/>
+ <media:group>
+ <media:content url='https://lh4.googleusercontent.com/BBBBBBBBBBBB/BBBBBBBBBBB/BBBBBBBBBBB/BBBBBBBBBBB/Album2.jpg' type='image/jpeg' medium='image'/>
+ <media:credit>Joomla</media:credit>
+ <media:description type='plain'>Summary</media:description>
+ <media:keywords/>
+ <media:thumbnail url='https://lh4.googleusercontent.com/BBBBBBBBBBBB/BBBBBBBBBBB/BBBBBBBBBBB/BBBBBBBBBBB/s160-c/Album2.jpg' height='160' width='160'/>
+ <media:title type='plain'>Album 2</media:title>
+ </media:group>
+</entry>
View
104 tests/suites/unit/joomla/google/albumlist.txt
@@ -0,0 +1,104 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<feed xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='abcdefghijklmnopqrstuvwxyz'>
+ <id>https://picasaweb.google.com/data/feed/user/12345678901234567890</id>
+ <updated>2012-01-01T01:00:00.000Z</updated>
+ <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#user'/>
+ <title>12345678901234567890</title>
+ <subtitle/>
+ <icon>https://lh6.googleusercontent.com/AAAAAAAAAAAA/AAAAAAAAAAA/AAAAAAAAAAA/AAAAAAAAAAA/AAAAA/12345678901234567890.jpg</icon>
+ <link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/12345678901234567890'/>
+ <link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/12345678901234567890'/>
+ <link rel='alternate' type='text/html' href='https://picasaweb.google.com/12345678901234567890'/>
+ <link rel='http://schemas.google.com/photos/2007#slideshow' type='application/x-shockwave-flash' href='https://picasaweb.google.com/s/c/bin/slideshow.swf?host=picasaweb.google.com&amp;RGB=0x000000&amp;feed=https%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2F12345678901234567890%3Falt%3Drss'/>
+ <link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/12345678901234567890?start-index=1&amp;max-results=1000'/>
+ <author>
+ <name>Joomla</name>
+ <uri>https://picasaweb.google.com/12345678901234567890</uri>
+ </author>
+ <generator version='1.00' uri='http://picasaweb.google.com/'>Picasaweb</generator>
+ <openSearch:totalResults>2</openSearch:totalResults>
+ <openSearch:startIndex>1</openSearch:startIndex>
+ <openSearch:itemsPerPage>1000</openSearch:itemsPerPage>
+ <gphoto:user>12345678901234567890</gphoto:user>
+ <gphoto:nickname>Joomla</gphoto:nickname>
+ <gphoto:thumbnail>https://lh6.googleusercontent.com//AAAAAAAAAAAA/AAAAAAAAAAA/AAAAAAAAAAA/AAAAAAAAAAA/AAAAA/12345678901234567890.jpg</gphoto:thumbnail>
+ <gphoto:quotalimit>1000000000</gphoto:quotalimit>
+ <gphoto:quotacurrent>500000000</gphoto:quotacurrent>
+ <gphoto:maxPhotosPerAlbum>1000</gphoto:maxPhotosPerAlbum>
+ <gphoto:organization name='Joomla' canSilo='false' canUnsilo='true' canUnsiloWithWarning='false'/>
+ <entry gd:etag='abcdefghijklmnopqrstuvwxyz'>
+ <id>https://picasaweb.google.com/data/entry/user/12345678901234567890/albumid/1234567890123456789</id>
+ <published>2012-01-01T01:00:00.000Z</published>
+ <updated>2012-01-01T01:00:00.000Z</updated>
+ <app:edited>2012-01-01T01:00:00.000Z</app:edited>
+ <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/>
+ <title>Album 1</title>
+ <summary/>
+ <rights>public</rights>
+ <link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/12345678901234567890/albumid/1234567890123456789'/>
+ <link rel='alternate' type='text/html' href='https://picasaweb.google.com/12345678901234567890/Album1'/>
+ <link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/12345678901234567890/albumid/1234567890123456789'/><link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/12345678901234567890/albumid/1234567890123456789'/>
+ <link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/12345678901234567890/albumid/1234567890123456789/acl'/>
+ <author>
+ <name>Joomla</name>
+ <uri>https://picasaweb.google.com/12345678901234567890</uri>
+ </author>
+ <gphoto:id>1234567890123456789</gphoto:id>
+ <gphoto:name>Album1</gphoto:name>
+ <gphoto:location/>
+ <gphoto:access>public</gphoto:access>
+ <gphoto:timestamp>1325379600000</gphoto:timestamp>
+ <gphoto:numphotos>50</gphoto:numphotos>
+ <gphoto:numphotosremaining>950</gphoto:numphotosremaining>
+ <gphoto:bytesUsed>5000000</gphoto:bytesUsed>
+ <gphoto:user>12345678901234567890</gphoto:user>
+ <gphoto:nickname>Joomla</gphoto:nickname>
+ <gphoto:organization name='Joomla'/>
+ <media:group>
+ <media:content url='https://lh4.googleusercontent.com/BBBBBBBBBBBB/BBBBBBBBBBB/BBBBBBBBBBB/BBBBBBBBBBB/Album1.jpg' type='image/jpeg' medium='image'/>
+ <media:credit>Joomla</media:credit>
+ <media:description type='plain'/>
+ <media:keywords/>
+ <media:thumbnail url='https://lh4.googleusercontent.com/BBBBBBBBBBBB/BBBBBBBBBBB/BBBBBBBBBBB/BBBBBBBBBBB/s160-c/Album1.jpg' height='160' width='160'/>
+ <media:title type='plain'>Thumbnail 1</media:title>
+ </media:group>
+ </entry>
+ <entry gd:etag='abcdefghijklmnopqrstuvwxyz'>
+ <id>https://picasaweb.google.com/data/entry/user/12345678901234567890/albumid/0123456789012345678</id>
+ <published>2011-01-01T01:00:00.000Z</published>
+ <updated>2011-01-01T01:00:00.000Z</updated>
+ <app:edited>2011-01-01T01:00:00.000Z</app:edited>
+ <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/>
+ <title>Album 2</title>
+ <summary>Summary</summary>
+ <rights>protected</rights>
+ <link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/12345678901234567890/albumid/0123456789012345678'/>
+ <link rel='alternate' type='text/html' href='https://lh4.googleusercontent.com/BBBBBBBBBBBB/BBBBBBBBBBB/BBBBBBBBBBB/BBBBBBBBBBB/Album2.jpg?locked=true'/>
+ <link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/12345678901234567890/albumid/0123456789012345678'/>
+ <link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/12345678901234567890/albumid/0123456789012345678'/>
+ <link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/12345678901234567890/albumid/0123456789012345678/acl'/>
+ <author>
+ <name>Joomla</name>
+ <uri>https://picasaweb.google.com/12345678901234567890</uri>
+ </author>
+ <gphoto:id>0123456789012345678</gphoto:id>
+ <gphoto:name>Album2</gphoto:name>
+ <gphoto:location>California</gphoto:location>
+ <gphoto:access>protected</gphoto:access>
+ <gphoto:timestamp>1293843600000</gphoto:timestamp>
+ <gphoto:numphotos>1</gphoto:numphotos>
+ <gphoto:numphotosremaining>999</gphoto:numphotosremaining>
+ <gphoto:bytesUsed>1000</gphoto:bytesUsed>
+ <gphoto:user>12345678901234567890</gphoto:user>
+ <gphoto:nickname>Joomla</gphoto:nickname>
+ <gphoto:organization name='Joomla'/>
+ <media:group>
+ <media:content url='https://lh4.googleusercontent.com/BBBBBBBBBBBB/BBBBBBBBBBB/BBBBBBBBBBB/BBBBBBBBBBB/Album2.jpg' type='image/jpeg' medium='image'/>
+ <media:credit>Joomla</media:credit>
+ <media:description type='plain'>Summary</media:description>
+ <media:keywords/>
+ <media:thumbnail url='https://lh4.googleusercontent.com/BBBBBBBBBBBB/BBBBBBBBBBB/BBBBBBBBBBB/BBBBBBBBBBB/s160-c/Album2.jpg' height='160' width='160'/>
+ <media:title type='plain'>Album 2</media:title>
+ </media:group>
+ </entry>
+</feed>
View
BIN tests/suites/unit/joomla/google/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
46 tests/suites/unit/joomla/google/photo.txt
@@ -0,0 +1,46 @@
+<entry xmlns='http://www.w3.org/2005/Atom' xmlns:exif='http://schemas.google.com/photos/exif/2007' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='9876543210'>
+ <id>https://picasaweb.google.com/data/entry/user/12345678901234567890/albumid/0123456789012345678/photoid/12345678901234567890</id>
+ <published>2012-02-02T00:00:00.000Z</published>
+ <updated>2012-02-02T00:00:00.000Z</updated>
+ <app:edited>2012-02-02T00:00:00.000Z</app:edited>
+ <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/>
+ <title>Photo2.jpg</title>
+ <summary>Summary</summary>
+ <content type='image/jpeg' src='https://lh3.googleusercontent.com/-VQfLCrQyGuw/UAYBmwBJZ3I/AAAAAAAAF-k/8y_1iBPJcdQ/Photo2.jpg'/>
+ <link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/12345678901234567890/albumid/0123456789012345678/photoid/12345678901234567890'/>
+ <link rel='alternate' type='text/html' href='https://picasaweb.google.com/12345678901234567890/InstantUpload#12345678901234567890'/>
+ <link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/HueCGWwvf1aM2RwzDxgHf9MTjNZETYmyPJy0liipFm0'/>
+ <link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/12345678901234567890/albumid/0123456789012345678/photoid/12345678901234567890'/>
+ <link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/12345678901234567890/albumid/0123456789012345678/photoid/12345678901234567890'/>
+ <link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/12345678901234567890/albumid/0123456789012345678/photoid/12345678901234567890'/>
+ <link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=12345678901234567890&amp;aid=0123456789012345678&amp;iid=12345678901234567890'/>
+ <gphoto:id>12345678901234567890</gphoto:id>
+ <gphoto:albumid>0123456789012345678</gphoto:albumid>
+ <gphoto:access>only_you</gphoto:access>
+ <gphoto:width>2048</gphoto:width>
+ <gphoto:height>1536</gphoto:height>
+ <gphoto:size>648818</gphoto:size>
+ <gphoto:checksum/>
+ <gphoto:timestamp>1328140800000</gphoto:timestamp>
+ <gphoto:imageVersion>5621</gphoto:imageVersion>
+ <gphoto:commentingEnabled>true</gphoto:commentingEnabled>
+ <gphoto:commentCount>0</gphoto:commentCount>
+ <gphoto:streamId>cs_01_3581ed3a4528c8c30dc2949233c0f566</gphoto:streamId>
+ <gphoto:license id='0' name='All Rights Reserved' url=''>ALL_RIGHTS_RESERVED</gphoto:license>
+ <gphoto:organization name='Joomla'/>
+ <exif:tags>
+ <exif:make>Samsung</exif:make>
+ <exif:model>Galaxy Nexus</exif:model>
+ <exif:imageUniqueID>ab409289ef230b509bc0def045b3a2c203</exif:imageUniqueID>
+ </exif:tags>
+ <media:group>
+ <media:content url='https://lh3.googleusercontent.com/sdgfdfgsdgf/werewr/aswertrt/vdfderer/Photo2.jpg' height='384' width='512' type='image/jpeg' medium='image'/>
+ <media:credit>Joomla</media:credit>
+ <media:description type='plain'/>
+ <media:keywords/>
+ <media:thumbnail url='https://lh3.googleusercontent.com/sdgfdfgsdgf/werewr/aswertrt/vdfderer/s72/Photo2.jpg' height='54' width='72'/>
+ <media:thumbnail url='https://lh3.googleusercontent.com/sdgfdfgsdgf/werewr/aswertrt/vdfderer/s144/Photo2.jpg' height='108' width='144'/>
+ <media:thumbnail url='https://lh3.googleusercontent.com/sdgfdfgsdgf/werewr/aswertrt/vdfderer/s288/Photo2.jpg' height='216' width='288'/>
+ <media:title type='plain'>Photo2.jpg</media:title>
+ </media:group>
+</entry>
View
130 tests/suites/unit/joomla/google/photolist.txt
@@ -0,0 +1,130 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<feed xmlns='http://www.w3.org/2005/Atom' xmlns:exif='http://schemas.google.com/photos/exif/2007' xmlns:app='http://www.w3.org/2007/app' xmlns:gphoto='http://schemas.google.com/photos/2007' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:gml='http://www.opengis.net/gml' xmlns:georss='http://www.georss.org/georss' gd:etag='ABCDEFGHIJKLMNOPQRSTUVWXYZ'>
+ <id>https://picasaweb.google.com/data/feed/user/12345678901234567890/albumid/0123456789012345678</id>
+ <updated>2012-01-01T00:00:00.000Z</updated>
+ <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#album'/>
+ <title>Album 2</title>
+ <subtitle>Summary</subtitle>
+ <rights>protected</rights>
+ <icon>https://lh3.googleusercontent.com/AAAAAAAAAA/AAAAAAAAAAA/AAAAAAAAGA8/AAAAAAAAAA/s160-c/Album2.jpg</icon>
+ <link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/12345678901234567890/albumid/0123456789012345678'/>
+ <link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/12345678901234567890/albumid/0123456789012345678'/>
+ <link rel='http://schemas.google.com/g/2005#resumable-create-media' type='application/atom+xml' href='https://picasaweb.google.com/data/upload/resumable/media/create-session/feed/api/user/12345678901234567890/albumid/0123456789012345678'/>
+ <link rel='alternate' type='text/html' href='https://picasaweb.google.com/12345678901234567890/Album2'/>
+ <link rel='http://schemas.google.com/photos/2007#slideshow' type='application/x-shockwave-flash' href='https://picasaweb.google.com/s/c/bin/slideshow.swf?host=picasaweb.google.com&amp;RGB=0x000000&amp;feed=https%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2F12345678901234567890%2Falbumid%2F0123456789012345678%3Falt%3Drss'/>
+ <link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=12345678901234567890&amp;aid=0123456789012345678'/>
+ <link rel='http://schemas.google.com/acl/2007#accessControlList' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/12345678901234567890/albumid/0123456789012345678/acl'/><link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/12345678901234567890/albumid/0123456789012345678?start-index=1&amp;max-results=1000'/>
+ <author>
+ <name>Joomla</name>
+ <uri>https://picasaweb.google.com/12345678901234567890</uri>
+ </author>
+ <generator version='1.00' uri='http://picasaweb.google.com/'>Picasaweb</generator>
+ <openSearch:totalResults>2</openSearch:totalResults>
+ <openSearch:startIndex>1</openSearch:startIndex>
+ <openSearch:itemsPerPage>1000</openSearch:itemsPerPage>
+ <gphoto:id>0123456789012345678</gphoto:id>
+ <gphoto:name>Album 2</gphoto:name>
+ <gphoto:location/>
+ <gphoto:access>protected</gphoto:access>
+ <gphoto:timestamp>1343427041000</gphoto:timestamp>
+ <gphoto:numphotos>2</gphoto:numphotos>
+ <gphoto:numphotosremaining>998</gphoto:numphotosremaining>
+ <gphoto:bytesUsed>200000</gphoto:bytesUsed>
+ <gphoto:user>12345678901234567890</gphoto:user>
+ <gphoto:nickname>Joomla</gphoto:nickname>
+ <gphoto:organization name='Joomla'/>
+ <gphoto:allowPrints>true</gphoto:allowPrints>
+ <gphoto:allowDownloads>true</gphoto:allowDownloads>
+ <entry gd:etag='1234567890'>
+ <id>https://picasaweb.google.com/data/entry/user/12345678901234567890/albumid/0123456789012345678/photoid/5769975399245691826</id>
+ <published>2012-01-01T00:00:00.000Z</published>
+ <updated>2012-01-01T00:00:00.000Z</updated>
+ <app:edited>2012-01-01T00:00:00.000Z</app:edited>
+ <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/>
+ <title>Photo1.jpg</title>
+ <summary>Summary</summary>
+ <content type='image/jpeg' src='https://lh6.googleusercontent.com/-L8ey-_izexw/UBMSDhLIO7I/AAAAAAAAGA8/Y3VYldk2-is/123456789101112.jpg'/>
+ <link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/12345678901234567890/albumid/0123456789012345678/photoid/5769975399245691826'/>
+ <link rel='alternate' type='text/html' href='https://picasaweb.google.com/12345678901234567890/InstantUpload#5769975399245691826'/>
+ <link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/d3ehSOyo0w6rkEPKwniVe9MTjNZETYmyPJy0liipFm0'/>
+ <link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/12345678901234567890/albumid/0123456789012345678/photoid/5769975399245691826'/>
+ <link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/12345678901234567890/albumid/0123456789012345678/photoid/5769975399245691826'/>
+ <link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/12345678901234567890/albumid/0123456789012345678/photoid/5769975399245691826'/>
+ <link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=12345678901234567890&amp;aid=0123456789012345678&amp;iid=5769975399245691826'/>
+ <gphoto:id>5769975399245691826</gphoto:id>
+ <gphoto:albumid>0123456789012345678</gphoto:albumid>
+ <gphoto:access>only_you</gphoto:access>
+ <gphoto:width>1000</gphoto:width>
+ <gphoto:height>2000</gphoto:height>
+ <gphoto:size>367407</gphoto:size>
+ <gphoto:checksum/>
+ <gphoto:timestamp>1325376000000</gphoto:timestamp>
+ <gphoto:imageVersion>670</gphoto:imageVersion>
+ <gphoto:commentingEnabled>true</gphoto:commentingEnabled>
+ <gphoto:commentCount>0</gphoto:commentCount>
+ <gphoto:streamId>cs_01_40a073077cb6345345f015c06ffa5e31</gphoto:streamId>
+ <gphoto:license id='0' name='All Rights Reserved' url=''>ALL_RIGHTS_RESERVED</gphoto:license>
+ <gphoto:organization name='Schmitz Family'/>
+ <exif:tags>
+ <exif:make>Samsung</exif:make>
+ <exif:model>Galaxy Nexus</exif:model>
+ <exif:imageUniqueID>dcbc9732abfadf5a31142e67b3256340</exif:imageUniqueID>
+ </exif:tags>
+ <media:group>
+ <media:content url='https://lh6.googleusercontent.com/asdfasdfs/waerawerawera/Aasdfasfdwe/Yasdfsdfs/123456789101112.jpg' height='512' width='384' type='image/jpeg' medium='image'/>
+ <media:credit>Joomla</media:credit>
+ <media:description type='plain'/>
+ <media:keywords/>
+ <media:thumbnail url='https://lh6.googleusercontent.com/asdfasdfs/waerawerawera/Aasdfasfdwe/Yasdfsdfs/s72/123456789101112.jpg' height='72' width='54'/>
+ <media:thumbnail url='https://lh6.googleusercontent.com/asdfasdfs/waerawerawera/Aasdfasfdwe/Yasdfsdfs/s144/123456789101112.jpg' height='144' width='108'/>
+ <media:thumbnail url='https://lh6.googleusercontent.com/asdfasdfs/waerawerawera/Aasdfasfdwe/Yasdfsdfs/s288/123456789101112.jpg' height='288' width='216'/>
+ <media:title type='plain'>123456789101112.jpg</media:title>
+ </media:group>
+ </entry>
+ <entry gd:etag='9876543210'>
+ <id>https://picasaweb.google.com/data/entry/user/12345678901234567890/albumid/0123456789012345678/photoid/12345678901234567890</id>
+ <published>2012-02-02T00:00:00.000Z</published>
+ <updated>2012-02-02T00:00:00.000Z</updated>
+ <app:edited>2012-02-02T00:00:00.000Z</app:edited>
+ <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/photos/2007#photo'/>
+ <title>Photo2.jpg</title>
+ <summary>Summary</summary>
+ <content type='image/jpeg' src='https://lh3.googleusercontent.com/-VQfLCrQyGuw/UAYBmwBJZ3I/AAAAAAAAF-k/8y_1iBPJcdQ/Photo2.jpg'/>
+ <link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://picasaweb.google.com/data/feed/api/user/12345678901234567890/albumid/0123456789012345678/photoid/12345678901234567890'/>
+ <link rel='alternate' type='text/html' href='https://picasaweb.google.com/12345678901234567890/InstantUpload#12345678901234567890'/>
+ <link rel='http://schemas.google.com/photos/2007#canonical' type='text/html' href='https://picasaweb.google.com/lh/photo/HueCGWwvf1aM2RwzDxgHf9MTjNZETYmyPJy0liipFm0'/>
+ <link rel='self' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/12345678901234567890/albumid/0123456789012345678/photoid/12345678901234567890'/>
+ <link rel='edit' type='application/atom+xml' href='https://picasaweb.google.com/data/entry/api/user/12345678901234567890/albumid/0123456789012345678/photoid/12345678901234567890'/>
+ <link rel='edit-media' type='image/jpeg' href='https://picasaweb.google.com/data/media/api/user/12345678901234567890/albumid/0123456789012345678/photoid/12345678901234567890'/>
+ <link rel='http://schemas.google.com/photos/2007#report' type='text/html' href='https://picasaweb.google.com/lh/reportAbuse?uname=12345678901234567890&amp;aid=0123456789012345678&amp;iid=12345678901234567890'/>
+ <gphoto:id>12345678901234567890</gphoto:id>
+ <gphoto:albumid>0123456789012345678</gphoto:albumid>
+ <gphoto:access>only_you</gphoto:access>
+ <gphoto:width>2048</gphoto:width>
+ <gphoto:height>1536</gphoto:height>
+ <gphoto:size>648818</gphoto:size>
+ <gphoto:checksum/>
+ <gphoto:timestamp>1328140800000</gphoto:timestamp>
+ <gphoto:imageVersion>5621</gphoto:imageVersion>
+ <gphoto:commentingEnabled>true</gphoto:commentingEnabled>
+ <gphoto:commentCount>0</gphoto:commentCount>
+ <gphoto:streamId>cs_01_3581ed3a4528c8c30dc2949233c0f566</gphoto:streamId>
+ <gphoto:license id='0' name='All Rights Reserved' url=''>ALL_RIGHTS_RESERVED</gphoto:license>
+ <gphoto:organization name='Joomla'/>
+ <exif:tags>
+ <exif:make>Samsung</exif:make>
+ <exif:model>Galaxy Nexus</exif:model>
+ <exif:imageUniqueID>ab409289ef230b509bc0def045b3a2c203</exif:imageUniqueID>
+ </exif:tags>
+ <media:group>
+ <media:content url='https://lh3.googleusercontent.com/sdgfdfgsdgf/werewr/aswertrt/vdfderer/Photo2.jpg' height='384' width='512' type='image/jpeg' medium='image'/>
+ <media:credit>Joomla</media:credit>
+ <media:description type='plain'/>
+ <media:keywords/>
+ <media:thumbnail url='https://lh3.googleusercontent.com/sdgfdfgsdgf/werewr/aswertrt/vdfderer/s72/Photo2.jpg' height='54' width='72'/>
+ <media:thumbnail url='https://lh3.googleusercontent.com/sdgfdfgsdgf/werewr/aswertrt/vdfderer/s144/Photo2.jpg' height='108' width='144'/>
+ <media:thumbnail url='https://lh3.googleusercontent.com/sdgfdfgsdgf/werewr/aswertrt/vdfderer/s288/Photo2.jpg' height='216' width='288'/>
+ <media:title type='plain'>Photo2.jpg</media:title>
+ </media:group>
+ </entry>
+</feed>

0 comments on commit 00e562d

Please sign in to comment.
Something went wrong with that request. Please try again.