Пример #1
0
 /**
  * The "After save" actions
  *
  * @return $this
  */
 public function afterSave()
 {
     parent::afterSave();
     if ($this->_oauthData->isCleanupProbability()) {
         $this->getResource()->deleteOldEntries($this->_oauthData->getCleanupExpirationPeriod());
     }
     return $this;
 }
Пример #2
0
 /**
  * The "After save" actions
  *
  * @return $this
  */
 protected function _afterSave()
 {
     parent::_afterSave();
     // Cleanup old entries
     if ($this->_oauthData->isCleanupProbability()) {
         $this->_getResource()->deleteOldEntries($this->_oauthData->getCleanupExpirationPeriod());
     }
     return $this;
 }
Пример #3
0
 public function testGetCleanupExpirationPeriodNonZero()
 {
     $this->_scopeConfigMock->expects($this->once())->method('getValue')->will($this->returnValue(10));
     $this->assertEquals(10, $this->_dataHelper->getCleanupExpirationPeriod());
 }