public function _before(FunctionalTester $I) { $rootPath = dirname(dirname(__DIR__)); require_once $rootPath . '/vendor/autoload.php'; foreach (glob($rootPath . '/src/Tacnoman/**.php') as $file) { require_once $file; } $this->config = \Tacnoman\Config::getInstance(); }
/** * Get instance and setting the default logLevel. * * @return \Tacnoman\Logger */ public static function getInstance() { if (is_null(self::$instance)) { self::$instance = new static(); $config = Config::getInstance(); $configLogLevel = $config->appConfigs['debug_level'] ?? 3; $logLevel = self::$instance->getDebugLevel($configLogLevel); self::$instance->logger = new KLogger(self::$path, $logLevel); } return self::$instance; }
public function _before(FunctionalTester $I) { $rootPath = dirname(dirname(__DIR__)); require_once $rootPath . '/vendor/autoload.php'; foreach (glob($rootPath . '/src/Tacnoman/**.php') as $file) { require_once $file; } $this->config = \Tacnoman\Config::getInstance(); $_ENV['THUMCNO_PATH'] = '/tmp'; $this->thumcnoServer = new \Tacnoman\ThumcnoServer(); }
protected function _before() { $this->config = \Tacnoman\Config::getInstance(); $this->urlValidator = new \Tacnoman\UrlValidator(); }
public function testSingletonConfig() { $config = \Tacnoman\Config::getInstance(); $this->assertInstanceOf('\\Tacnoman\\Config', $config); }
protected function _before() { $this->config = \Tacnoman\Config::getInstance(); $_ENV['THUMCNO_PATH'] = '/tmp/'; $this->thumcnoServer = new \Tacnoman\ThumcnoServer(); }