mirror of
https://github.com/friendica/friendica
synced 2025-04-28 00:30:10 +00:00
Changing Friendica\App\Mode from static methods to public methods
- Changing from static methods to public methods - Adding dev-composer-dependency Mockery for static method mocking (f.e. Config, DBA) - Adding ModeTest with Mocking - removing bootstrap from phpunit.xml because of double loading tests\bootstrap.php
This commit is contained in:
parent
5014779052
commit
31148e25cf
21 changed files with 498 additions and 106 deletions
|
@ -84,7 +84,7 @@ HELP;
|
|||
throw new CommandArgsException('Too many arguments');
|
||||
}
|
||||
|
||||
if (!App\Mode::has(App\Mode::DBCONFIGAVAILABLE)) {
|
||||
if (!$a->getMode()->has(App\Mode::DBCONFIGAVAILABLE)) {
|
||||
$this->out('Database isn\'t ready or populated yet, showing file config only');
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ HELP;
|
|||
if (count($this->args) == 0) {
|
||||
Core\Config::load();
|
||||
|
||||
if (Core\Config::get('system', 'config_adapter') == 'jit' && App\Mode::has(App\Mode::DBCONFIGAVAILABLE)) {
|
||||
if (Core\Config::get('system', 'config_adapter') == 'jit' && $a->getMode()->has(App\Mode::DBCONFIGAVAILABLE)) {
|
||||
$this->out('Warning: The JIT (Just In Time) Config adapter doesn\'t support loading the entire configuration, showing file config only');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue