Config FollowUp
- New Configuration (Config is now only holding the instance) - New PConfiguration (PConfig is now only holding the instance) - Config & PConfig-Adapter don't need "ConfigCache" anymore - DB-Connection is now outside App->reload() for better dependency-chaining
This commit is contained in:
parent
c36a0eabdb
commit
eafcf3592d
59 changed files with 1754 additions and 1038 deletions
|
@ -90,19 +90,14 @@ class ModeTest extends MockedTest
|
|||
$this->mockConnected(true, 1);
|
||||
$this->mockFetchFirst('SHOW TABLES LIKE \'config\'', true, 1);
|
||||
|
||||
$config = \Mockery::mock('Friendica\Core\Config\ConfigCache');
|
||||
$config = \Mockery::mock('Friendica\Core\Config\Configuration');
|
||||
$config
|
||||
->shouldReceive('get')
|
||||
->with('system', 'maintenance', null)
|
||||
->with('system', 'maintenance', null, false)
|
||||
->andReturn(true)
|
||||
->once();
|
||||
// Initialize empty Config
|
||||
Config::init($config);
|
||||
$configAdapter = \Mockery::mock('Friendica\Core\Config\IConfigAdapter');
|
||||
$configAdapter
|
||||
->shouldReceive('isConnected')
|
||||
->andReturn(false);
|
||||
Config::setAdapter($configAdapter);
|
||||
|
||||
$mode = new Mode($this->root->url());
|
||||
$mode->determine();
|
||||
|
@ -123,19 +118,14 @@ class ModeTest extends MockedTest
|
|||
$this->mockConnected(true, 1);
|
||||
$this->mockFetchFirst('SHOW TABLES LIKE \'config\'', true, 1);
|
||||
|
||||
$config = \Mockery::mock('Friendica\Core\Config\ConfigCache');
|
||||
$config = \Mockery::mock('Friendica\Core\Config\Configuration');
|
||||
$config
|
||||
->shouldReceive('get')
|
||||
->with('system', 'maintenance', null)
|
||||
->with('system', 'maintenance', null, false)
|
||||
->andReturn(false)
|
||||
->once();
|
||||
// Initialize empty Config
|
||||
Config::init($config);
|
||||
$configAdapter = \Mockery::mock('Friendica\Core\Config\IConfigAdapter');
|
||||
$configAdapter
|
||||
->shouldReceive('isConnected')
|
||||
->andReturn(false);
|
||||
Config::setAdapter($configAdapter);
|
||||
|
||||
$mode = new Mode($this->root->url());
|
||||
$mode->determine();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue