|
|
@@ -252,8 +252,9 @@ class Zend_Feed_Pubsubhubbub_Subscriber_CallbackTest extends PHPUnit_Framework_T
|
|
|
$rowdata = new stdClass;
|
|
|
$rowdata->id = 'verifytokenkey';
|
|
|
$rowdata->verify_token = hash('sha256', 'cba');
|
|
|
- $t = time();
|
|
|
- $rowdata->created_time = $t;
|
|
|
+ $t = new Zend_Date;
|
|
|
+ $rowdata->created_time = $t->get(Zend_Date::TIMESTAMP);
|
|
|
+ $rowdata->lease_seconds = 10000;
|
|
|
$this->_rowset->expects($this->any())
|
|
|
->method('current')
|
|
|
->will($this->returnValue($rowdata));
|
|
|
@@ -261,7 +262,7 @@ class Zend_Feed_Pubsubhubbub_Subscriber_CallbackTest extends PHPUnit_Framework_T
|
|
|
$this->_tableGateway->expects($this->once())
|
|
|
->method('update')
|
|
|
->with(
|
|
|
- $this->equalTo(array('id'=>'verifytokenkey','verify_token'=>hash('sha256', 'cba'),'created_time'=>$t,'verified'=>'1')),
|
|
|
+ $this->equalTo(array('id'=>'verifytokenkey','verify_token'=>hash('sha256', 'cba'),'created_time'=>$t->get(Zend_Date::TIMESTAMP),'lease_seconds'=>10000,'subscription_state'=>'verified','last_modified'=>$t->get('yyyy-MM-dd HH:mm:ss'),'expiration_time'=>$t->add(10000,Zend_Date::SECOND)->get('yyyy-MM-dd HH:mm:ss'))),
|
|
|
$this->equalTo('id = \'verifytokenkey\'')
|
|
|
);
|
|
|
$this->_adapter->expects($this->once())
|
|
|
@@ -282,8 +283,9 @@ class Zend_Feed_Pubsubhubbub_Subscriber_CallbackTest extends PHPUnit_Framework_T
|
|
|
$rowdata = new stdClass;
|
|
|
$rowdata->id = 'verifytokenkey';
|
|
|
$rowdata->verify_token = hash('sha256', 'cba');
|
|
|
- $t = time();
|
|
|
- $rowdata->created_time = $t;
|
|
|
+ $t = new Zend_Date;
|
|
|
+ $rowdata->created_time = $t->get(Zend_Date::TIMESTAMP);
|
|
|
+ $rowdata->lease_seconds = 10000;
|
|
|
$this->_rowset->expects($this->any())
|
|
|
->method('current')
|
|
|
->will($this->returnValue($rowdata));
|
|
|
@@ -291,7 +293,7 @@ class Zend_Feed_Pubsubhubbub_Subscriber_CallbackTest extends PHPUnit_Framework_T
|
|
|
$this->_tableGateway->expects($this->once())
|
|
|
->method('update')
|
|
|
->with(
|
|
|
- $this->equalTo(array('id'=>'verifytokenkey','verify_token'=>hash('sha256', 'cba'),'created_time'=>$t,'verified'=>'1')),
|
|
|
+ $this->equalTo(array('id'=>'verifytokenkey','verify_token'=>hash('sha256', 'cba'),'created_time'=>$t->get(Zend_Date::TIMESTAMP),'lease_seconds'=>10000,'subscription_state'=>'verified','last_modified'=>$t->get('yyyy-MM-dd HH:mm:ss'),'expiration_time'=>$t->add(10000,Zend_Date::SECOND)->get('yyyy-MM-dd HH:mm:ss'))),
|
|
|
$this->equalTo('id = \'verifytokenkey\'')
|
|
|
);
|
|
|
$this->_adapter->expects($this->once())
|