createConfig(self::$configCache, $configModel); $pconfigModel = new \Friendica\Model\Config\PConfig(self::$dba); $configFactory->createPConfig(self::$configCache, new PConfigCache(), $pconfigModel); $loggerFactory = new Factory\LoggerFactory(); $logger = $loggerFactory->create('test', self::$dba, $config, self::$profiler); $baseUrl = new BaseURL($config, $_SERVER); $router = new App\Router(); $l10n = new L10n($config, self::$dba, $logger); $this->app = new App(self::$dba, $config, self::$mode, $router, $baseUrl, $logger, self::$profiler, $l10n, false); parent::setUp(); // Default config Config::set('config', 'hostname', 'localhost'); Config::set('system', 'throttle_limit_day', 100); Config::set('system', 'throttle_limit_week', 100); Config::set('system', 'throttle_limit_month', 100); Config::set('system', 'theme', 'system_theme'); } /** * @small */ public function testExists() { $this->assertTrue(DBA::exists('config', [])); $this->assertFalse(DBA::exists('notable', [])); $this->assertTrue(DBA::exists('config', null)); $this->assertFalse(DBA::exists('notable', null)); $this->assertTrue(DBA::exists('config', ['k' => 'hostname'])); $this->assertFalse(DBA::exists('config', ['k' => 'nonsense'])); } }