Example #1
0
 public function testUnsubscriptionRequestSendsExpectedPostData()
 {
     $this->_subscriber->setTopicUrl('http://www.example.com/topic');
     $this->_subscriber->addHubUrl($this->_baseuri . '/testRawPostData.php');
     $this->_subscriber->setCallbackUrl('http://www.example.com/callback');
     $this->_subscriber->setTestStaticToken('abc');
     //override for testing
     $this->_subscriber->unsubscribeAll();
     $this->assertEquals('hub.callback=http%3A%2F%2Fwww.example.com%2Fcallback%3Fxhub.subscription%3D5536df06b5d' . 'cb966edab3a4c4d56213c16a8184b&hub.mode=unsubscribe&hub.topic=http' . '%3A%2F%2Fwww.example.com%2Ftopic&hub.verify=sync&hub.verify=async' . '&hub.verify_token=abc', $this->_client->getResponse()->getBody());
 }
 public function testGetStorageThrowsExceptionIfNoneSet()
 {
     $this->setExpectedException('Zend\\Feed\\PubSubHubbub\\Exception\\ExceptionInterface');
     $this->subscriber->getStorage();
 }