Переглянути джерело

Zend_Feed_Pubsubhubbub: Patched a test to use correct mocked workflow for Subscription model

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@19799 44c647ce-9c0f-0410-b52a-842ac1e357ba
padraic 16 роки тому
батько
коміт
2d73ea8991
1 змінених файлів з 12 додано та 0 видалено
  1. 12 0
      tests/Zend/Feed/Pubsubhubbub/Subscriber/CallbackTest.php

+ 12 - 0
tests/Zend/Feed/Pubsubhubbub/Subscriber/CallbackTest.php

@@ -243,6 +243,18 @@ class Zend_Feed_Pubsubhubbub_Subscriber_CallbackTest extends PHPUnit_Framework_T
 
 
     public function testRespondsToValidConfirmationWith200Response()
     public function testRespondsToValidConfirmationWith200Response()
     {
     {
+        $this->_get['hub_mode'] = 'unsubscribe';
+        $this->_tableGateway->expects($this->any())
+            ->method('find')
+            ->with($this->equalTo('verifytokenkey'))
+            ->will($this->returnValue($this->_rowset));
+        $rowdata = new stdClass;
+        $rowdata->id = 'verifytokenkey';
+        $rowdata->verify_token = hash('sha256', 'cba');
+        $rowdata->created_time = time();
+        $this->_rowset->expects($this->any())
+            ->method('current')
+            ->will($this->returnValue($rowdata));
         $this->_callback->handle($this->_get);
         $this->_callback->handle($this->_get);
         $this->assertTrue($this->_callback->getHttpResponse()->getHttpResponseCode() == 200);
         $this->assertTrue($this->_callback->getHttpResponse()->getHttpResponseCode() == 200);
     }
     }