Index: tests/Zend/Gdata/AuthSubTest.php =================================================================== --- tests/Zend/Gdata/AuthSubTest.php (revision 24026) +++ tests/Zend/Gdata/AuthSubTest.php (working copy) @@ -125,4 +125,17 @@ $c->setAuthSubPrivateKeyFile("zendauthsubfilenotfound", null, true); } } + + /** + * @group ZF-11351 + * @expectedException Zend_Gdata_App_HttpException + */ + public function testAuthSubGetHttpClientShouldThrowExceptionOnVanillaHttpClient() + { + $client = new Zend_Http_Client(); + $client->setUri('http://example.com/AuthSub'); + $gdclient = Zend_Gdata_AuthSub::getHttpClient('FakeToken', $client); + $this->fail('Expected exception Zend_Gdata_App_HttpException not raised!'); + } + } Index: library/Zend/Gdata/AuthSub.php =================================================================== --- library/Zend/Gdata/AuthSub.php (revision 24026) +++ library/Zend/Gdata/AuthSub.php (working copy) @@ -229,9 +229,9 @@ if ($client == null) { $client = new Zend_Gdata_HttpClient(); } - if (!$client instanceof Zend_Http_Client) { + if (!$client instanceof Zend_Gdata_HttpClient) { require_once 'Zend/Gdata/App/HttpException.php'; - throw new Zend_Gdata_App_HttpException('Client is not an instance of Zend_Http_Client.'); + throw new Zend_Gdata_App_HttpException('Client is not an instance of Zend_Gdata_HttpClient.'); } $useragent = 'Zend_Framework_Gdata/' . Zend_Version::VERSION; $client->setConfig(array(