+ /** @var Database */
+ protected static $dba;
+
+ /** @var BasePath */
+ protected static $basePath;
+
+ /** @var Mode */
+ protected static $mode;
+
+ /** @var ConfigCache */
+ protected static $configCache;
+
+ /** @var Profiler */
+ protected static $profiler;
+
+ public static function setUpBeforeClass()
+ {
+ parent::setUpBeforeClass();
+
+ self::$basePath = new BasePath(dirname(__DIR__));
+ $configLoader = new ConfigFileLoader(self::$basePath->getPath());
+ $configFactory = new ConfigFactory();
+ self::$configCache = $configFactory->createCache($configLoader);
+ self::$profiler = new Profiler(self::$configCache);
+ self::$dba = new Database(self::$configCache, self::$profiler, new NullLogger(), $_SERVER);
+ self::$mode = new Mode(self::$basePath, self::$dba, self::$configCache);
+ }
+