Kaynağa Gözat

[php] Report database name with correct capitalization. Starting SQLite tests

Cauê Waneck 11 yıl önce
ebeveyn
işleme
cd02ad5af3
3 değiştirilmiş dosya ile 9 ekleme ve 2 silme
  1. 7 0
      std/php/db/PDO.hx
  2. 1 1
      tests/RunTravis.hx
  3. 1 1
      tests/unit/Test.hx

+ 7 - 0
std/php/db/PDO.hx

@@ -100,6 +100,13 @@ private class PDOConnection implements Connection {
 			pdo = untyped __call__("new PDO", dsn, user, password, arr);
 		}
 		dbname = dsn.split(':').shift();
+		switch(dbname.toLowerCase())
+		{
+			case "sqlite":
+				dbname = "SQLite";
+			case "mysql":
+				dbname = "MySQL";
+		}
 	}
 
 	public function close() {

+ 1 - 1
tests/RunTravis.hx

@@ -267,7 +267,7 @@ class RunTravis {
 		switch (systemName) {
 			case "Linux":
 				runCommand("sudo", ["apt-get", "install", "php5", "-qq"], true);
-				runCommand("sudo", ["apt-get", "install", "php5-mysql", "-qq"], true);
+				runCommand("sudo", ["apt-get", "install", "php5-mysql", "php5-sqlite", "-qq"], true);
 			case "Mac":
 				//pass
 		}

+ 1 - 1
tests/unit/Test.hx

@@ -301,7 +301,7 @@ class Test #if swf_mark implements mt.Protect #end {
 				pass : "",
 				database : "haxe_test" })),
 			#end
-			// new TestSpod(sys.db.Sqlite.open("db.db3")),
+			new TestSpod(sys.db.Sqlite.open("db.db3")),
 			#end
 			// #if ( (java || neko) && !macro && !interp)
 			// new TestThreads(),