Пример #1
0
 public function testPersist()
 {
     $model = new State($this->config, $this->writer);
     $constraint = new \PHPUnit_Framework_Constraint_IsInstanceOf('Magento\\Framework\\App\\Cache\\Type\\ConfigSegment');
     $this->writer->expects($this->once())->method('update')->with($constraint);
     $model->persist();
 }
Пример #2
0
 public function testPersist()
 {
     $model = new State($this->config, $this->writer);
     $this->config->expects($this->once())->method('getConfigData')->willReturn(['test_cache_type' => true]);
     $configValue = [ConfigFilePool::APP_CONFIG => ['cache_types' => ['test_cache_type' => true]]];
     $this->writer->expects($this->once())->method('saveConfig')->with($configValue);
     $model->persist();
 }