]> granicus.if.org Git - php/commitdiff
- Regroup and add a test
authorMarcus Boerger <helly@php.net>
Sat, 19 Feb 2005 14:02:24 +0000 (14:02 +0000)
committerMarcus Boerger <helly@php.net>
Sat, 19 Feb 2005 14:02:24 +0000 (14:02 +0000)
ext/sqlite/tests/sqlite_spl_001.phpt [moved from ext/sqlite/tests/sqlite_oo_031.phpt with 99% similarity]
ext/sqlite/tests/sqlite_spl_002.phpt [moved from ext/sqlite/tests/sqlite_oo_032.phpt with 96% similarity]
ext/sqlite/tests/sqlite_spl_003.phpt [new file with mode: 0755]

similarity index 99%
rename from ext/sqlite/tests/sqlite_oo_031.phpt
rename to ext/sqlite/tests/sqlite_spl_001.phpt
index f0ed40a425ab1d9adfb8646258ee6f4e63035719..4afb8cb712283d7e23fdd53e826d9391059a85ec 100755 (executable)
@@ -1,5 +1,5 @@
 --TEST--
-sqlite-oo: and spl
+sqlite-spl: Iteration
 --SKIPIF--
 <?php # vim:ft=php
 if (!extension_loaded("sqlite")) print "skip"; 
similarity index 96%
rename from ext/sqlite/tests/sqlite_oo_032.phpt
rename to ext/sqlite/tests/sqlite_spl_002.phpt
index 15d4c9c952202465c770e26c2143346037603d2a..c60ca01e02d05dbab42d65b7dc30d0c38ff7c3f0 100755 (executable)
@@ -1,5 +1,5 @@
 --TEST--
-sqlite-oo: and SPL Countable
+sqlite-spl: Countable
 --SKIPIF--
 <?php # vim:ft=php
 if (!extension_loaded("sqlite")) print "skip"; 
diff --git a/ext/sqlite/tests/sqlite_spl_003.phpt b/ext/sqlite/tests/sqlite_spl_003.phpt
new file mode 100755 (executable)
index 0000000..267ceff
--- /dev/null
@@ -0,0 +1,28 @@
+--TEST--
+sqlite-spl: Exception
+--SKIPIF--
+<?php # vim:ft=php
+if (!extension_loaded("sqlite")) print "skip"; 
+if (!extension_loaded("spl")) print "skip SPL is not present"; 
+?>
+--FILE--
+<?php
+
+try
+{
+       $db = sqlite_factory();
+}
+catch(SQLiteException $e)
+{
+       $parents = class_parents($e);
+       if (array_key_exists('RuntimeException', $parents))
+       {
+               echo "GOOD\n";
+       }
+}
+
+?>
+===DONE===
+--EXPECT--
+GOOD
+===DONE===