Skip to content
Browse files

Fix URL encoding.

  • Loading branch information...
1 parent 085092f commit 5d41daed762e0eb85f6dacc7fa88f376394c527b @aaronschmitz aaronschmitz committed with LouisLandry
View
8 libraries/joomla/google/data.php
@@ -105,11 +105,11 @@ protected static function safeXML($data)
protected function listGetData($url, $maxpages = 1, $token = null)
{
$qurl = $url;
- if (strpos($url, '&'))
+ if (strpos($url, '&') && isset($token))
{
$qurl .= '&pageToken=' . $token;
}
- else
+ elseif (isset($token))
{
$qurl .= 'pageToken=' . $token;
}
@@ -124,6 +124,10 @@ protected function listGetData($url, $maxpages = 1, $token = null)
}
return $data['items'];
}
+ elseif ($data)
+ {
+ return array();
+ }
else
{
throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`.");
View
81 libraries/joomla/google/data/adsense.php
@@ -28,56 +28,11 @@ class JGoogleDataAdsense extends JGoogleData
*/
public function __construct(JRegistry $options = null, JGoogleAuth $auth = null)
{
- $options = isset($options) ? $options : new JRegistry;
- if (!$options->get('scope'))
- {
- $options->set('scope', 'https://www.googleapis.com/auth/adsense');
- }
- if (isset($auth) && !$auth->getOption('scope'))
- {
- $auth->setOption('scope', 'https://www.googleapis.com/auth/adsense');
- }
-
parent::__construct($options, $auth);
- }
- /**
- * Method to retrieve a list of AdSense data
- *
- * @param array $url URL to GET
- * @param int $maxpages Maximum number of pages of accounts to return
- * @param string $token Next page token
- *
- * @return mixed Data from Google
- *
- * @since 12.2
- * @throws UnexpectedValueException
- */
- protected function listGetData($url, $maxpages = 1, $token = null)
- {
- $qurl = $url;
- if (strpos($url, '&'))
- {
- $qurl .= '&pageToken=' . $token;
- }
- else
+ if (isset($this->auth) && !$this->auth->getOption('scope'))
{
- $qurl .= 'pageToken=' . $token;
- }
- $jdata = $this->query($qurl);
- $data = json_decode($jdata->body, true);
-
- if ($data && array_key_exists('items', $data))
- {
- if ($maxpages != 1 && array_key_exists('nextPageToken', $data))
- {
- $data['items'] = array_merge($data['items'], $this->listGetData($url, $maxpages - 1, $data['nextPageToken']));
- }
- return $data['items'];
- }
- else
- {
- throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`.");
+ $this->auth->setOption('scope', 'https://www.googleapis.com/auth/adsense');
}
}
@@ -95,7 +50,7 @@ public function getAccount($accountID, $subaccounts = true)
{
if ($this->authenticated())
{
- $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . $accountID . $subaccounts ? '?tree=true' : '';
+ $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID) . ($subaccounts ? '?tree=true' : '');
$jdata = $this->query($url);
if ($data = json_decode($jdata->body, true))
{
@@ -129,7 +84,7 @@ public function listAccounts($options = array(), $maxpages = 1)
{
$next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null;
unset($options['nextPageToken']);
- $url = 'https://www.googleapis.com/adsense/v1.1/accounts?' . implode('&', $options);
+ $url = 'https://www.googleapis.com/adsense/v1.1/accounts?' . http_build_query($options);
return $this->listGetData($url, $maxpages, $next);
}
else
@@ -156,7 +111,7 @@ public function listClients($accountID, $options = array(), $maxpages = 1)
{
$next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null;
unset($options['nextPageToken']);
- $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . $accountID . '/adclients?' . implode('&', $options);
+ $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID) . '/adclients?' . http_build_query($options);
return $this->listGetData($url, $maxpages, $next);
}
else
@@ -180,7 +135,8 @@ public function getUnit($accountID, $adclientID, $adunitID)
{
if ($this->authenticated())
{
- $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . $accountID . '/adclients/' . $adclientID . '/adunits/' . $adunitID;
+ $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID);
+ $url .= '/adclients/' . urlencode($adclientID) . '/adunits/' . urlencode($adunitID);
$jdata = $this->query($url);
if ($data = json_decode($jdata->body, true))
{
@@ -217,8 +173,8 @@ public function listUnitChannels($accountID, $adclientID, $adunitID, $options =
{
$next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null;
unset($options['nextPageToken']);
- $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . $accountID;
- $url .= '/adclients/' . $adclientID . '/adunits/' . $adunitID . '/customchannels?' . implode('&', $options);
+ $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID);
+ $url .= '/adclients/' . urlencode($adclientID) . '/adunits/' . urlencode($adunitID) . '/customchannels?' . http_build_query($options);
return $this->listGetData($url, $maxpages, $next);
}
else
@@ -242,7 +198,8 @@ public function getChannel($accountID, $adclientID, $channelID)
{
if ($this->authenticated())
{
- $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . $accountID . '/adclients/' . $adclientID . '/customchannels/' . $channelID;
+ $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID) . '/adclients/';
+ $url .= urlencode($adclientID) . '/customchannels/' . urlencode($channelID);
$jdata = $this->query($url);
if ($data = json_decode($jdata->body, true))
{
@@ -278,8 +235,8 @@ public function listChannels($accountID, $adclientID, $options = array(), $maxpa
{
$next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null;
unset($options['nextPageToken']);
- $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . $accountID . '/adclients/' . $adclientID;
- $url .= '/customchannels?' . implode('&', $options);
+ $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID) . '/adclients/' . urlencode($adclientID);
+ $url .= '/customchannels?' . http_build_query($options);
return $this->listGetData($url, $maxpages, $next);
}
else
@@ -308,8 +265,8 @@ public function listChannelUnits($accountID, $adclientID, $channelID, $options =
{
$next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null;
unset($options['nextPageToken']);
- $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . $accountID . '/adclients/' . $adclientID;
- $url .= '/customchannels/' . $channelID . '/adunits?' . implode('&', $options);
+ $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID) . '/adclients/' . urlencode($adclientID);
+ $url .= '/customchannels/' . urlencode($channelID) . '/adunits?' . http_build_query($options);
return $this->listGetData($url, $maxpages, $next);
}
else
@@ -337,8 +294,8 @@ public function listUrlChannels($accountID, $adclientID, $options = array(), $ma
{
$next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null;
unset($options['nextPageToken']);
- $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . $accountID;
- $url .= '/adclients/' . $adclientID . '/urlchannels?' . implode('&', $options);
+ $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID);
+ $url .= '/adclients/' . urlencode($adclientID) . '/urlchannels?' . http_build_query($options);
return $this->listGetData($url, $maxpages, $next);
}
else
@@ -392,7 +349,7 @@ public function generateReport($accountID, $start, $end = false, $options = arra
$endobj = new DateTime;
$endobj->setTimestamp($end);
}
- elseif (is_string($start))
+ elseif (is_string($end))
{
$endobj = new DateTime($end);
}
@@ -411,7 +368,7 @@ public function generateReport($accountID, $start, $end = false, $options = arra
$begin = array_key_exists('startIndex', $options) ? $options['startIndex'] : 0;
unset($options['startIndex']);
- $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . $accountID . '/reports?' . implode('&', $options);
+ $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID) . '/reports?' . http_build_query($options);
if (strpos($url, '&'))
{
$url .= '&';
View
105 libraries/joomla/google/data/calendar.php
@@ -28,17 +28,12 @@ class JGoogleDataCalendar extends JGoogleData
*/
public function __construct(JRegistry $options = null, JGoogleAuth $auth = null)
{
- $options = isset($options) ? $options : new JRegistry;
- if (!$options->get('scope'))
- {
- $options->set('scope', 'https://www.googleapis.com/auth/calendar');
- }
- if (isset($auth) && !$auth->getOption('scope'))
+ parent::__construct($options, $auth);
+
+ if (isset($this->auth) && !$this->auth->getOption('scope'))
{
- $auth->setOption('scope', 'https://www.googleapis.com/auth/calendar');
+ $this->auth->setOption('scope', 'https://www.googleapis.com/auth/calendar');
}
-
- parent::__construct($options, $auth);
}
/**
@@ -55,7 +50,7 @@ public function removeCalendar($calendarID)
{
if ($this->authenticated())
{
- $jdata = $this->query('https://www.googleapis.com/calendar/v3/users/me/calendarList/' . $calendarID, null, null, 'delete');
+ $jdata = $this->query('https://www.googleapis.com/calendar/v3/users/me/calendarList/' . urlencode($calendarID), null, null, 'delete');
if ($jdata->body != '')
{
throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`.");
@@ -82,7 +77,7 @@ public function getCalendar($calendarID)
{
if ($this->authenticated())
{
- $jdata = $this->query('https://www.googleapis.com/calendar/v3/users/me/calendarList/' . $calendarID);
+ $jdata = $this->query('https://www.googleapis.com/calendar/v3/users/me/calendarList/' . urlencode($calendarID));
if ($data = json_decode($jdata->body, true))
{
return $data;
@@ -146,22 +141,10 @@ public function listCalendars($options = array(), $maxpages = 1)
{
if ($this->authenticated())
{
- $url = 'https://www.googleapis.com/calendar/v3/users/me/calendarList?' . implode('&', $options);
- $jdata = $this->query($url);
- $data = json_decode($jdata->body, true);
-
- if ($data && array_key_exists('items', $data))
- {
- if ($maxpages != 1 && array_key_exists('nextPageToken', $data))
- {
- $data['items'] = array_merge($data['items'], $this->listEvents($options, $maxpages - 1));
- }
- return $data['items'];
- }
- else
- {
- throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`.");
- }
+ $next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null;
+ unset($options['nextPageToken']);
+ $url = 'https://www.googleapis.com/calendar/v3/users/me/calendarList?' . http_build_query($options);
+ return $this->listGetData($url, $maxpages, $next);
}
else
{
@@ -184,7 +167,7 @@ public function editCalendarSettings($calendarID, $options)
{
if ($this->authenticated())
{
- $url = 'https://www.googleapis.com/calendar/v3/users/me/calendarList/' . $calendarID;
+ $url = 'https://www.googleapis.com/calendar/v3/users/me/calendarList/' . urlencode($calendarID);
$jdata = $this->query($url, json_encode($options), array('Content-type' => 'application/json'), 'put');
if ($data = json_decode($jdata->body, true))
{
@@ -215,10 +198,10 @@ public function clearCalendar($calendarID)
{
if ($this->authenticated())
{
- $data = $this->query('https://www.googleapis.com/calendar/v3/users/me/calendars/' . $calendarID . '/clear', null, null, 'post');
+ $data = $this->query('https://www.googleapis.com/calendar/v3/users/me/calendars/' . urlencode($calendarID) . '/clear', null, null, 'post');
if ($data->body != '')
{
- throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`.");
+ throw new UnexpectedValueException("Unexpected data received from Google: `{$data->body}`.");
}
return true;
}
@@ -242,7 +225,7 @@ public function deleteCalendar($calendarID)
{
if ($this->authenticated())
{
- $data = $this->query('https://www.googleapis.com/calendar/v3/users/me/calendars/' . $calendarID, null, null, 'delete');
+ $data = $this->query('https://www.googleapis.com/calendar/v3/users/me/calendars/' . urlencode($calendarID), null, null, 'delete');
if ($data->body != '')
{
throw new UnexpectedValueException("Unexpected data received from Google: `{$data->body}`.");
@@ -303,7 +286,7 @@ public function editCalendar($calendarID, $options)
{
if ($this->authenticated())
{
- $url = 'https://www.googleapis.com/calendar/v3/users/me/calendars/' . $calendarID;
+ $url = 'https://www.googleapis.com/calendar/v3/users/me/calendars/' . urlencode($calendarID);
$jdata = $this->query($url, json_encode($options), array('Content-type' => 'application/json'), 'put');
$data = json_decode($jdata->body, true);
@@ -337,7 +320,7 @@ public function deleteEvent($calendarID, $eventID)
{
if ($this->authenticated())
{
- $url = 'https://www.googleapis.com/calendar/v3/users/me/calendars/' . $calendarID . '/events/' . $eventID;
+ $url = 'https://www.googleapis.com/calendar/v3/users/me/calendars/' . urlencode($calendarID) . '/events/' . urlencode($eventID);
$data = $this->query($url, null, null, 'delete');
if ($data->body != '')
{
@@ -367,7 +350,8 @@ public function getEvent($calendarID, $eventID, $options = array())
{
if ($this->authenticated())
{
- $url = 'https://www.googleapis.com/calendar/v3/users/me/calendarList/' . $calendarID . '/events/' . $eventID . '?' . implode('&', $options);
+ $url = 'https://www.googleapis.com/calendar/v3/users/me/calendarList/';
+ $url .= urlencode($calendarID) . '/events/' . urlencode($eventID) . '?' . http_build_query($options);
$jdata = $this->query($url);
if ($data = json_decode($jdata->body, true))
{
@@ -436,7 +420,7 @@ public function createEvent($calendarID, $start, $end = false, $options = array(
$endobj = new DateTime;
$endobj->setTimestamp($end);
}
- elseif (is_string($start))
+ elseif (is_string($end))
{
$endobj = new DateTime($end);
}
@@ -465,7 +449,7 @@ public function createEvent($calendarID, $start, $end = false, $options = array(
$options['start']['timeZone'] = $startobj->getTimezone()->getName();
$options['end']['timeZone'] = $endobj->getTimezone()->getName();
}
- elseif (is_a($end, 'DateTimeZone'))
+ elseif (is_a($timezone, 'DateTimeZone'))
{
$options['start']['timeZone'] = $timezone->getName();
$options['end']['timeZone'] = $timezone->getName();
@@ -476,7 +460,7 @@ public function createEvent($calendarID, $start, $end = false, $options = array(
$options['end']['timeZone'] = $timezone;
}
- $url = 'https://www.googleapis.com/calendar/v3/calendars/' . $calendarID . '/events' . ($notify ? '?sendNotifications=true' : '');
+ $url = 'https://www.googleapis.com/calendar/v3/calendars/' . urlencode($calendarID) . '/events' . ($notify ? '?sendNotifications=true' : '');
$jdata = $this->query($url, json_encode($options), array('Content-type' => 'application/json'), 'post');
if ($data = json_decode($jdata->body, true))
{
@@ -510,23 +494,11 @@ public function listRecurrences($calendarID, $eventID, $options = array(), $maxp
{
if ($this->authenticated())
{
- $url = 'https://www.googleapis.com/calendar/v3/users/me/calendars/' . $calendarID . '/events/' . $eventID . '/instances';
- $url .= '?' . implode('&', $options);
- $jdata = $this->query($url);
- $data = json_decode($jdata->body, true);
-
- if ($data && array_key_exists('items', $data))
- {
- if ($maxpages != 1 && array_key_exists('nextPageToken', $data))
- {
- $data['items'] = array_merge($data['items'], $this->listRecurrences($calendarID, $eventID, $options, $maxpages - 1));
- }
- return $data['items'];
- }
- else
- {
- throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`.");
- }
+ $next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null;
+ unset($options['nextPageToken']);
+ $url = 'https://www.googleapis.com/calendar/v3/users/me/calendars/' . urlencode($calendarID) . '/events/' . urlencode($eventID) . '/instances';
+ $url .= '?' . http_build_query($options);
+ return $this->listGetData($url, $maxpages, $next);
}
else
{
@@ -550,22 +522,10 @@ public function listEvents($calendarID, $options = array(), $maxpages = 1)
{
if ($this->authenticated())
{
- $url = 'https://www.googleapis.com/calendar/v3/users/me/calendars/' . $calendarID . '?' . implode('&', $options);
- $jdata = $this->query($url);
- $data = json_decode($jdata->body, true);
-
- if ($data && array_key_exists('items', $data))
- {
- if ($maxpages != 1 && array_key_exists('nextPageToken', $data))
- {
- $data['items'] = array_merge($data['items'], $this->listEvents($calendarID, $options, $maxpages - 1));
- }
- return $data['items'];
- }
- else
- {
- throw new UnexpectedValueException("Unexpected data received from Google: `{$jdata->body}`.");
- }
+ $next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null;
+ unset($options['nextPageToken']);
+ $url = 'https://www.googleapis.com/calendar/v3/calendars/' . urlencode($calendarID) . '/events?' . http_build_query($options);
+ return $this->listGetData($url, $maxpages, $next);
}
else
{
@@ -590,7 +550,7 @@ public function moveEvent($calendarID, $eventID, $destID, $notify = false)
{
if ($this->authenticated())
{
- $url = 'https://www.googleapis.com/calendar/v3/calendars/' . $calendarID . '/events/' . $eventID . '/move';
+ $url = 'https://www.googleapis.com/calendar/v3/calendars/' . urlencode($calendarID) . '/events/' . urlencode($eventID) . '/move';
$url .= '?destination=' . $destID . ($notify ? '&sendNotifications=true' : '');
$jdata = $this->query($url, null, null, 'post');
if ($data = json_decode($jdata->body, true))
@@ -625,7 +585,8 @@ public function editEvent($calendarID, $eventID, $options, $notify = false)
{
if ($this->authenticated())
{
- $url = 'https://www.googleapis.com/calendar/v3/calendars/' . $calendarID . '/events/' . $eventID . ($notify ? '?sendNotifications=true' : '');
+ $url = 'https://www.googleapis.com/calendar/v3/calendars/';
+ $url .= urlencode($calendarID) . '/events/' . urlencode($eventID) . ($notify ? '?sendNotifications=true' : '');
$jdata = $this->query($url, json_encode($options), array('Content-type' => 'application/json'), 'put');
if ($data = json_decode($jdata->body, true))
{
View
4 libraries/joomla/google/data/picasa.php
@@ -50,7 +50,7 @@ public function listAlbums($userID = 'default')
{
if ($this->authenticated())
{
- $url = 'https://picasaweb.google.com/data/feed/api/user/' . $userID;
+ $url = 'https://picasaweb.google.com/data/feed/api/user/' . urlencode($userID);
$jdata = $this->query($url, null, array('GData-Version' => 2));
$xml = $this->safeXML($jdata->body);
if (isset($xml->children()->entry))
@@ -107,7 +107,7 @@ public function createAlbum($userID = 'default', $title = '', $access = 'private
$cat->addAttribute('scheme', 'http://schemas.google.com/g/2005#kind');
$cat->addAttribute('term', 'http://schemas.google.com/photos/2007#album');
- $url = 'https://picasaweb.google.com/data/feed/api/user/' . $userID;
+ $url = 'https://picasaweb.google.com/data/feed/api/user/' . urlencode($userID);
$jdata = $this->query($url, $xml->asXML(), array('GData-Version' => 2, 'Content-type' => 'application/atom+xml'), 'post');
$xml = $this->safeXML($jdata->body);
View
2 tests/suites/unit/joomla/google/JGoogleAuthOauth2Test.php
@@ -52,7 +52,7 @@ class JGoogleAuthOauth2Test extends PHPUnit_Framework_TestCase
protected function setUp()
{
$this->options = new JRegistry;
- $this->http = $this->getMock('JOauthHttp', array('head', 'get', 'delete', 'trace', 'post', 'put', 'patch'), array($this->options));
+ $this->http = $this->getMock('JHttp', 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->object = new JGoogleAuthOauth2($this->options, $this->oauth);
View
8 tests/suites/unit/joomla/google/JGoogleDataAdsenseTest.php
@@ -57,7 +57,7 @@ class JGoogleDataAdsenseTest extends PHPUnit_Framework_TestCase
protected function setUp()
{
$this->options = new JRegistry;
- $this->http = $this->getMock('JOauthHttp', array('head', 'get', 'delete', 'trace', 'post', 'put', 'patch'), array($this->options));
+ $this->http = $this->getMock('JHttp', 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);
@@ -220,7 +220,7 @@ public function testListChannelUnits()
public function testListUrlChannels()
{
$this->http->expects($this->once())->method('get')->will($this->returnCallback('jsonAdsenseCallback'));
- $result = $this->object->listUrlChannels('accountID', array('option' => 'value'));
+ $result = $this->object->listUrlChannels('accountID', 'clientID', array('option' => 'value'));
$this->assertEquals($result, array('1' => 1, '2' => 2));
}
@@ -346,13 +346,13 @@ public function testExceptions()
$functions['getAccount'] = array('accountID');
$functions['listAccounts'] = array(array('option' => 'value'));
- $functions['listClients'] = array(array('option' => 'value'));
+ $functions['listClients'] = array('accountID', array('option' => 'value'));
$functions['getUnit'] = array('accountID', 'clientID', 'unitID');
$functions['listUnitChannels'] = array('accountID', 'clientID', 'unitID', array('option' => 'value'));
$functions['getChannel'] = array('accountID', 'clientID', 'channelID');
$functions['listChannels'] = array('accountID', 'clientID', array('option' => 'value'));
$functions['listChannelUnits'] = array('accountID', 'clientID', 'channelID', array('option' => 'value'));
- $functions['listUrlChannels'] = array('accountID', array('option' => 'value'));
+ $functions['listUrlChannels'] = array('accountID', 'clientID', array('option' => 'value'));
$functions['generateReport'] = array('accountID', time(), time() + 100000, array('option' => 'value'));
foreach ($functions as $function => $params)
View
2 tests/suites/unit/joomla/google/JGoogleDataCalendarTest.php
@@ -57,7 +57,7 @@ class JGoogleDataCalendarTest extends PHPUnit_Framework_TestCase
protected function setUp()
{
$this->options = new JRegistry;
- $this->http = $this->getMock('JOauthHttp', array('head', 'get', 'delete', 'trace', 'post', 'put', 'patch'), array($this->options));
+ $this->http = $this->getMock('JHttp', 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);
View
2 tests/suites/unit/joomla/google/JGoogleDataPicasaAlbumTest.php
@@ -62,7 +62,7 @@ class JGoogleDataPicasaAlbumTest extends PHPUnit_Framework_TestCase
protected function setUp()
{
$this->options = new JRegistry;
- $this->http = $this->getMock('JOauthHttp', array('head', 'get', 'delete', 'trace', 'post', 'put', 'patch'), array($this->options));
+ $this->http = $this->getMock('JHttp', 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);
View
2 tests/suites/unit/joomla/google/JGoogleDataPicasaPhotoTest.php
@@ -62,7 +62,7 @@ class JGoogleDataPicasaPhotoTest extends PHPUnit_Framework_TestCase
protected function setUp()
{
$this->options = new JRegistry;
- $this->http = $this->getMock('JOauthHttp', array('head', 'get', 'delete', 'trace', 'post', 'put', 'patch'), array($this->options));
+ $this->http = $this->getMock('JHttp', 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);
View
2 tests/suites/unit/joomla/google/JGoogleDataPicasaTest.php
@@ -57,7 +57,7 @@ class JGoogleDataPicasaTest extends PHPUnit_Framework_TestCase
protected function setUp()
{
$this->options = new JRegistry;
- $this->http = $this->getMock('JOauthHttp', array('head', 'get', 'delete', 'trace', 'post', 'put', 'patch'), array($this->options));
+ $this->http = $this->getMock('JHttp', 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);
View
2 tests/suites/unit/joomla/google/JGoogleTest.php
@@ -57,7 +57,7 @@ class JGoogleTest extends PHPUnit_Framework_TestCase
protected function setUp()
{
$this->options = new JRegistry;
- $this->http = $this->getMock('JOauthHttp', array('head', 'get', 'delete', 'trace', 'post', 'put', 'patch'), array($this->options));
+ $this->http = $this->getMock('JHttp', 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);

0 comments on commit 5d41dae

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