當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_Feed_Pubsubhubbub::setHttpClient方法代碼示例

本文整理匯總了PHP中Zend_Feed_Pubsubhubbub::setHttpClient方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Feed_Pubsubhubbub::setHttpClient方法的具體用法?PHP Zend_Feed_Pubsubhubbub::setHttpClient怎麽用?PHP Zend_Feed_Pubsubhubbub::setHttpClient使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend_Feed_Pubsubhubbub的用法示例。


在下文中一共展示了Zend_Feed_Pubsubhubbub::setHttpClient方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 public function setUp()
 {
     $client = new Zend_Http_Client();
     Zend_Feed_Pubsubhubbub::setHttpClient($client);
     $this->_subscriber = new Zend_Feed_Pubsubhubbub_Subscriber();
     $this->_adapter = $this->_getCleanMock('Zend_Db_Adapter_Abstract');
     $this->_tableGateway = $this->_getCleanMock('Zend_Db_Table_Abstract');
     $this->_tableGateway->expects($this->any())->method('getAdapter')->will($this->returnValue($this->_adapter));
 }
開發者ID:SustainableCoastlines,項目名稱:loveyourwater,代碼行數:9,代碼來源:SubscriberTest.php

示例2: setUp

 public function setUp()
 {
     $this->_adapter = new Zend_Http_Client_Adapter_Test();
     $this->_storage = new Zend_Feed_Pubsubhubbub_Storage_Filesystem();
     $this->_skey = sha1('http://www.example.com/callback' . 'http://www.example.com/topic' . 'subscription');
     $this->_tkey = sha1('http://www.example.com/callback' . 'http://www.example.com/topic' . 'challenge');
     $client = new Zend_Http_Client();
     $client->setAdapter($this->_adapter);
     Zend_Feed_Pubsubhubbub::setHttpClient($client);
     $this->_callback = new Zend_Feed_Pubsubhubbub_HubServer_Callback();
     $this->_callback->setStorage($this->_storage);
     $this->_originalServer = $_SERVER;
     $_SERVER['REQUEST_METHOD'] = 'POST';
 }
開發者ID:padraic,項目名稱:zfhubbub,代碼行數:14,代碼來源:CallbackTest.php

示例3: setUp

 public function setUp()
 {
     if (defined('TESTS_Zend_Feed_Pubsubhubbub_BASEURI') && Zend_Uri_Http::check(TESTS_Zend_Feed_Pubsubhubbub_BASEURI)) {
         $this->_baseuri = TESTS_Zend_Feed_Pubsubhubbub_BASEURI;
         if (substr($this->_baseuri, -1) != '/') {
             $this->_baseuri .= '/';
         }
         $name = $this->getName();
         if (($pos = strpos($name, ' ')) !== false) {
             $name = substr($name, 0, $pos);
         }
         $uri = $this->_baseuri . $name . '.php';
         $this->_adapter = new $this->_config['adapter']();
         $this->_client = new Zend_Http_Client($uri, $this->_config);
         $this->_client->setAdapter($this->_adapter);
         Zend_Feed_Pubsubhubbub::setHttpClient($this->_client);
         $this->_subscriber = new Zend_Feed_Pubsubhubbub_Subscriber();
         $this->_subscriber->setStorage(new Zend_Feed_Pubsubhubbub_Storage_Filesystem());
     } else {
         // Skip tests
         $this->markTestSkipped("Zend_Feed_Pubsubhubbub_Subscriber dynamic tests'\n            . ' are not enabled in TestConfiguration.php");
     }
 }
開發者ID:padraic,項目名稱:zfhubbub,代碼行數:23,代碼來源:SubscriberHttpTest.php

示例4: testCanSetCustomHttpClient

 public function testCanSetCustomHttpClient()
 {
     Zend_Feed_Pubsubhubbub::setHttpClient(new Test_Http_Client_Pubsub());
     $this->assertType('Test_Http_Client_Pubsub', Zend_Feed_Pubsubhubbub::getHttpClient());
 }
開發者ID:travisj,項目名稱:zf,代碼行數:5,代碼來源:PubsubhubbubTest.php

示例5: testNotifiesHubAndReportsFail

 public function testNotifiesHubAndReportsFail()
 {
     Zend_Feed_Pubsubhubbub::setHttpClient(new Zend_Feed_Pubsubhubbub_PublisherTest_ClientFail());
     $client = Zend_Feed_Pubsubhubbub::getHttpClient();
     $this->_publisher->addHubUrl('http://www.example.com/hub');
     $this->_publisher->addUpdatedTopicUrl('http://www.example.com/topic');
     $this->_publisher->setParameter('foo', 'bar');
     $this->_publisher->notifyAll();
     $this->assertFalse($this->_publisher->isSuccess());
 }
開發者ID:omusico,項目名稱:logica,代碼行數:10,代碼來源:PublisherTest.php

示例6: setUp

 public function setUp()
 {
     $client = new Zend_Http_Client();
     Zend_Feed_Pubsubhubbub::setHttpClient($client);
     $this->_hub = new Zend_Feed_Pubsubhubbub_HubServer();
 }
開發者ID:padraic,項目名稱:zfhubbub,代碼行數:6,代碼來源:HubServerTest.php

示例7: testCanSetCustomHttpClient

 public function testCanSetCustomHttpClient()
 {
     Zend_Feed_Pubsubhubbub::setHttpClient(new Test_Http_Client_Pubsub());
     $this->assertTrue(Zend_Feed_Pubsubhubbub::getHttpClient() instanceof Test_Http_Client_Pubsub);
 }
開發者ID:sasezaki,項目名稱:mirror-zf1-tests,代碼行數:5,代碼來源:PubsubhubbubTest.php

示例8: setUp

 public function setUp()
 {
     $client = new Zend_Http_Client();
     Zend_Feed_Pubsubhubbub::setHttpClient($client);
     $this->_subscriber = new Zend_Feed_Pubsubhubbub_Subscriber();
 }
開發者ID:padraic,項目名稱:zfhubbub,代碼行數:6,代碼來源:SubscriberTest.php


注:本文中的Zend_Feed_Pubsubhubbub::setHttpClient方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。