use Friendica\App;
use Friendica\BaseObject;
use Friendica\Core\Config;
-use Friendica\Core\Config\ConfigCache;
use Friendica\Render\FriendicaSmartyEngine;
use Mockery\MockInterface;
use org\bovigo\vfs\vfsStreamDirectory;
protected $app;
/**
- * @var MockInterface|ConfigCache The mocked Config Cache
+ * @var MockInterface|Config\Configuration The mocked Config Cache
*/
protected $configCache;
* Mock the App
*
* @param vfsStreamDirectory $root The root directory
- * @param MockInterface|ConfigCache $config The config cache
+ * @param MockInterface|Config\Configuration $config The config cache
*/
- public function mockApp($root, $config)
+ public function mockApp($root, Config\Configuration $config)
{
$this->configCache = $config;
// Mocking App and most used functions
->andReturn('localhost');
$config
->shouldReceive('get')
- ->with('system', 'theme', NULL)
+ ->with('system', 'theme', NULL, false)
->andReturn('system_theme');
+ $config
+ ->shouldReceive('getConfig')
+ ->andReturn($config);
$this->app
- ->shouldReceive('getConfig')
+ ->shouldReceive('getConfigCache')
->andReturn($config);
$this->app
// Initialize empty Config
Config::init($config);
- $configAdapter = \Mockery::mock('Friendica\Core\Config\IConfigAdapter');
- $configAdapter
- ->shouldReceive('isConnected')
- ->andReturn(false);
- Config::setAdapter($configAdapter);
BaseObject::setApp($this->app);
}