示例#1
0
 /**
  * @magentoDbIsolation enabled
  */
 public function testGetSaveAllOptions()
 {
     $options = $this->_model->getAllOptions();
     $this->assertArrayNotHasKey('test_option', $options);
     $options['test_option'] = 1;
     $this->_model->saveAllOptions($options);
     $this->assertEquals($options, $this->_model->getAllOptions());
 }
示例#2
0
 public function testPersist()
 {
     $cacheTypes = array('cache_type' => false);
     $model = $this->_buildModel($cacheTypes);
     $this->_resource->expects($this->once())->method('saveAllOptions')->with($cacheTypes);
     $this->_cacheFrontend->expects($this->once())->method('remove')->with(\Magento\Framework\App\Cache\State::CACHE_ID);
     $model->persist();
 }