add GPL V3

add specific bootstrap for unit tests
This commit is contained in:
Manuel Raynaud
2013-01-07 10:46:02 +01:00
parent 5967dc2b55
commit 1016596256
5 changed files with 150 additions and 315 deletions

View File

@@ -44,21 +44,21 @@ class Tlog Implements TlogInterface
const VAR_SHOW_REDIRECT = "tlog_show_redirect";
// all level of trace
const TRACE = 1;
const DEBUG = 2;
const WARNING = 3;
const INFO = 4;
const ERROR = 5;
const FATAL = 6;
const MUET = PHP_INT_MAX;
const TRACE = 1;
const DEBUG = 2;
const WARNING = 3;
const INFO = 4;
const ERROR = 5;
const FATAL = 6;
const MUET = PHP_INT_MAX;
// default values
const DEFAULT_LEVEL = self::DEBUG;
const DEFAUT_DESTINATIONS = "Thelia\Log\Destination\TlogDestinationNull";
const DEFAUT_PREFIXE = "#NUM: #NIVEAU [#FICHIER:#FONCTION()] {#LIGNE} #DATE #HEURE: ";
const DEFAUT_FILES = "*";
const DEFAUT_IP = "";
const DEFAUT_SHOW_REDIRECT = 0;
const DEFAULT_LEVEL = self::DEBUG;
const DEFAUT_DESTINATIONS = "Thelia\Log\Destination\TlogDestinationFile";
const DEFAUT_PREFIXE = "#NUM: #NIVEAU [#FICHIER:#FONCTION()] {#LIGNE} #DATE #HEURE: ";
const DEFAUT_FILES = "*";
const DEFAUT_IP = "";
const DEFAUT_SHOW_REDIRECT = 0;
private static $instance = false;

View File

@@ -47,6 +47,7 @@ class TlogTest extends \PHPUnit_Framework_TestCase
->will($this->returnValue($configModel));
$containerMock->expects($this->any())
->method("getParameter")
->with($this->stringContains("logger.class"))
->will($this->returnValue("Thelia\Log\Tlog"));

View File

@@ -0,0 +1,9 @@
<?php
/**
*
* @file
* Functions needed for Thelia bootstrap
*/
define('THELIA_ROOT', __DIR__ .'/../../../../');
$loader = require __DIR__ . '/../../../autoload.php';