Beispiel #1
0
 /**
  * Clean logs
  *
  * @param \Magento\Log\Model\Log $object
  * @return $this
  */
 public function clean(\Magento\Log\Model\Log $object)
 {
     $cleanTime = $object->getLogCleanTime();
     $this->_cleanVisitors($cleanTime);
     $this->_cleanCustomers($cleanTime);
     $this->_cleanUrls();
     return $this;
 }
Beispiel #2
0
 public function testGetLogCleanTime()
 {
     $this->scopeConfig->expects($this->once())->method('getValue')->with(Log::XML_LOG_CLEAN_DAYS, \Magento\Store\Model\ScopeInterface::SCOPE_STORE)->will($this->returnValue(30));
     $this->assertEquals(2592000, $this->log->getLogCleanTime());
 }