Ejemplo n.º 1
0
 /**
  * Run when initializing
  *
  * @return null
  */
 public static function setUpBeforeClass()
 {
     $database = self::_database();
     $con = self::_connection();
     TORM\Connection::setConnection($con, "test");
     TORM\Connection::setEncoding("UTF-8");
     TORM\Connection::setDriver($database);
     TORM\Factory::setFactoriesPath("./factories");
     TORM\Log::enable(false);
     self::$user = new User();
     self::$user->id = 1;
     self::$user->name = "John Doe Jr.";
     self::$user->email = "*****@*****.**";
     self::$user->code = "12345";
     self::$user->user_level = 1;
 }
Ejemplo n.º 2
0
 /**
  * Run when initializing
  *
  * @return null
  */
 public static function setUpBeforeClass()
 {
     $file = realpath(dirname(__FILE__) . "/../database/test.sqlite3");
     self::$con = new PDO("sqlite:{$file}");
     // self::$con  = new PDO('mysql:host=localhost;dbname=torm',"torm","torm");
     TORM\Connection::setConnection(self::$con, "test");
     TORM\Connection::setEncoding("UTF-8");
     TORM\Connection::setDriver("sqlite");
     // TORM\Connection::setDriver("mysql");
     TORM\Factory::setFactoriesPath("./factories");
     TORM\Log::enable(false);
     self::$user = new User();
     self::$user->id = 1;
     self::$user->name = "John Doe Jr.";
     self::$user->email = "*****@*****.**";
     self::$user->code = "12345";
     self::$user->level = 1;
 }