Пример #1
0
 /**
  * @param string $path
  * @param mixed $expectedValue
  * @param string $default
  * @dataProvider getConfigByPathDataProvider
  */
 public function testgetConfigByPath($path, $expectedValue, $default)
 {
     $testData = ['key_1' => ['key_1.1' => ['key_1.1.1' => 'value_1.1.1'], 'key_1.2' => ['some' => 'arrayValue']]];
     $this->_cacheMock->expects($this->any())->method('load')->will($this->returnValue(serialize([])));
     $this->_model->merge($testData);
     $this->assertEquals($expectedValue, $this->_model->get($path, $default));
 }
Пример #2
0
 /**
  * Merge additional config
  *
  * @param array $config
  * @return void
  */
 public function merge(array $config)
 {
     if (isset($config['config']['system'])) {
         $config = $config['config']['system'];
     }
     parent::merge($config);
 }