public function test_load()
 {
     // set clean config file, must load defaults from default config
     file_put_contents($this->config->config_file, '{}');
     //empty json
     $def_config = $this->config->getDefaultCfg();
     // cfg will be used for loading as default
     $def_config->system->level2 = 'value 2';
     // test new level 2. must be added
     $mock_cfg = $this->getMockBuilder('\\app\\components\\Configuration')->disableOriginalConstructor()->setMethods(['getDefaultCfg'])->getMock();
     $mock_cfg->expects($this->any())->method('getDefaultCfg')->willReturn($def_config);
     $mock_cfg->load($this->config->config_file);
     // load old config, our modified default config must apply level1 and level2 params
     $this->assertEquals('cp1251', $mock_cfg->library->codepage);
     $this->assertEquals($mock_cfg->system->level2, 'value 2');
 }