예제 #1
0
 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();
 }
예제 #2
0
파일: Logger.php 프로젝트: tacnoman/thumcno
 /**
  * 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;
 }
예제 #3
0
 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();
 }
예제 #4
0
 protected function _before()
 {
     $this->config = \Tacnoman\Config::getInstance();
     $this->urlValidator = new \Tacnoman\UrlValidator();
 }
예제 #5
0
 public function testSingletonConfig()
 {
     $config = \Tacnoman\Config::getInstance();
     $this->assertInstanceOf('\\Tacnoman\\Config', $config);
 }
예제 #6
0
 protected function _before()
 {
     $this->config = \Tacnoman\Config::getInstance();
     $_ENV['THUMCNO_PATH'] = '/tmp/';
     $this->thumcnoServer = new \Tacnoman\ThumcnoServer();
 }