]> granicus.if.org Git - php/commitdiff
Remove special-case from test for SQLite persistent connections.
authorMarc Boeren <mboeren@php.net>
Wed, 13 Aug 2003 07:54:31 +0000 (07:54 +0000)
committerMarc Boeren <mboeren@php.net>
Wed, 13 Aug 2003 07:54:31 +0000 (07:54 +0000)
ext/dbx/tests/003.phpt
ext/dbx/tests/dbx_test.p

index 01c05f6e8cd4b7c7b5b69b37769093ab0a942606..9c0c3b0e86b8602aeee40e55d955b08bcb01c130 100644 (file)
@@ -49,18 +49,14 @@ else {
         }
     }
 
-if ($module != DBX_SQLITE) { // skip persistent tests for sqlite until that bug is solved
-
 $dlo = dbx_connect($module_name, $host, $database, $username, $password, DBX_PERSISTENT);
 if ($dlo!=0) {
        print('persistent connect using string ok'."\n");
-    var_dump($dlo->handle);
        dbx_close($dlo);
        }
 $dlo = dbx_connect($module, $host, $database, $username, $password, DBX_PERSISTENT);
 if ($dlo!=0) {
        print('persistent connect using constant ok'."\n");
-    var_dump($dlo->handle);
        dbx_close($dlo);
        }
 // sqlite is a special case as it will just create a db if it isn't found
@@ -77,22 +73,20 @@ else {
         dbx_close($dlo);
         }
     }
-$dlo = @dbx_connect($module, $host, $database, $nonexisting_username, $nonexisting_password, DBX_PERSISTENT);
-if ($dlo==0) {
-       print('persistent connect with false username/password combi failed, so it\'s ok'."\n");
-       }
-else {
-    print_r($dlo);
-       dbx_close($dlo);
+// sqlite is a special case as it doesn't use user/password restrictions
+if ($module == DBX_SQLITE) {
+    print('persistent connect with false username/password combi failed, so it\'s ok'."\n");
     }
-
-}  // skip persistent tests for sqlite until that bug is solved
 else {
-       print('persistent connect using string ok'."\n");
-       print('persistent connect using constant ok'."\n");
-    print('persistent connect to non-existing database failed, so it\'s ok'."\n");
-       print('persistent connect with false username/password combi failed, so it\'s ok'."\n");
-}
+    $dlo = @dbx_connect($module, $host, $database, $nonexisting_username, $nonexisting_password, DBX_PERSISTENT);
+    if ($dlo==0) {
+        print('persistent connect with false username/password combi failed, so it\'s ok'."\n");
+        }
+    else {
+        print_r($dlo);
+        dbx_close($dlo);
+        }
+    }
 
 $dlo = @dbx_connect($module, $host, $database, $username, $password, DBX_PERSISTENT, "12many");
 if ($dlo==0) {
index 00fe1f2e37fedb87a77d3c390f3bb048fd8bc4a4..5c98ca6dd0ed20c2bc77c45cacf1f87131c42ebf 100644 (file)
@@ -63,7 +63,7 @@ switch ($connection) {
     case DBX_SQLITE:
         $module=DBX_SQLITE;
         $host="";
-        $database="ext\\dbx\\tests\\dbx_test.sqlite.db";
+        $database="dbx_test.sqlite.db";
         $username="";
         $password="";
         $module_name="sqlite";