public function testRetrievesUniqueUpdatedTopicUrlsOnly() { $this->publisher->addUpdatedTopicUrls(array( 'http://www.example.com/topic', 'http://www.example.com/topic2', 'http://www.example.com/topic' )); $this->assertEquals(array( 'http://www.example.com/topic', 'http://www.example.com/topic2' ), $this->publisher->getUpdatedTopicUrls()); }
/** * Pubsubhubbub送信 */ protected function sendPubsubhubbub() { // Pubsubhubbub発行オブジェクトを生成 $publisher = new Publisher(); // Pubsubhubbubを送るサーバーをセット $publisher->addHubUrls(self::$pubsubhubbub_server); // ページをセット $publisher->addUpdatedTopicUrls(array($this->wiki->uri())); $publisher->notifyAll(); if (!$publisher->isSuccess()) { // check for errors $errors = $publisher->getErrors(); $failedHubs = array(); foreach ($errors as $error) { $failedHubs[] = $error['hubUrl']; } return $failedHubs; } return null; }