/**
  * Flush the saved configuration from by core and module tables.
  */
 public function flush()
 {
     foreach ($this->_collection->load() as $entry) {
         $this->_coreConfigResource->deleteConfig($entry->getPath(), $entry->getScopeType(), $entry->getScopeId());
     }
     $this->_collection->walk('delete');
 }
Esempio n. 2
0
 public function testSaveDeleteConfig()
 {
     $connection = $this->_model->getReadConnection();
     $select = $connection->select()->from($this->_model->getMainTable())->where('path=?', 'test/config');
     $this->_model->saveConfig('test/config', 'test', 'default', 0);
     $this->assertNotEmpty($connection->fetchRow($select));
     $this->_model->deleteConfig('test/config', 'default', 0);
     $this->assertEmpty($connection->fetchRow($select));
 }