Пример #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 testIsCleanupProbabilityRandomOne()
 {
     $this->_scopeConfigMock->expects($this->once())->method('getValue')->will($this->returnValue(1));
     $this->assertTrue($this->_dataHelper->isCleanupProbability());
 }