public function setUp() { // Instantiate the global session variable $_SESSION = array(); // Instantiate the global cookie variable $_COOKIE = array(); $this->user = new User(); $this->user->config->database->pdo = $this->getPDO(); $this->user->start(); parent::setUp(); }
public function setUp() { // Instantiate the global session variable $_SESSION = array(); // Instantiate the global cookie variable $_COOKIE = array(); $this->user = new User(); $this->user->config->database->dsn = 'sqlite::memory:'; $this->user->start(); // Creates the table $this->user->table->runQuery("\n CREATE TABLE IF NOT EXISTS _table_ (\n `ID` INTEGER PRIMARY KEY AUTOINCREMENT,\n `Username` varchar(15) NOT NULL,\n `Password` char(40) ,\n `Email` varchar(35) ,\n `Activated` tinyint(1) NOT NULL DEFAULT '0',\n `Confirmation` char(40),\n `RegDate` int(11) ,\n `LastLogin` int(11) NOT NULL DEFAULT '0'\n )\n "); //Create user $this->user->table->runQuery(' INSERT INTO _table_(`ID`, `Username`, `Password`, `Email`, `Activated`, `RegDate`) VALUES (1,"pablo","18609a032b2504973748587e8c428334","*****@*****.**",1,1361145707) '); }