Ejemplo n.º 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();
 }
Ejemplo n.º 2
0
 /**
  * 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;
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 4
0
 protected function _before()
 {
     $this->config = \Tacnoman\Config::getInstance();
     $this->urlValidator = new \Tacnoman\UrlValidator();
 }
Ejemplo n.º 5
0
 public function testSingletonConfig()
 {
     $config = \Tacnoman\Config::getInstance();
     $this->assertInstanceOf('\\Tacnoman\\Config', $config);
 }
Ejemplo n.º 6
0
 protected function _before()
 {
     $this->config = \Tacnoman\Config::getInstance();
     $_ENV['THUMCNO_PATH'] = '/tmp/';
     $this->thumcnoServer = new \Tacnoman\ThumcnoServer();
 }