summaryrefslogtreecommitdiff
path: root/ext/sqlite/tests/sqlite_002.phpt
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-04-18 20:53:18 +0000
committerMarcus Boerger <helly@php.net>2003-04-18 20:53:18 +0000
commitcde6bdce5c440de2c7d96ae7c29a882cf3b6484f (patch)
treeab4705a2e6ea1f66c28de092932d637c1cba4812 /ext/sqlite/tests/sqlite_002.phpt
parent16e873f864dba72279b406958cad3c7fd3f25955 (diff)
downloadphp-git-cde6bdce5c440de2c7d96ae7c29a882cf3b6484f.tar.gz
Improve test environment, fix 001.phpt and rename that one, also change from /tmp to dirname(__FILE__)
Diffstat (limited to 'ext/sqlite/tests/sqlite_002.phpt')
-rwxr-xr-xext/sqlite/tests/sqlite_002.phpt29
1 files changed, 29 insertions, 0 deletions
diff --git a/ext/sqlite/tests/sqlite_002.phpt b/ext/sqlite/tests/sqlite_002.phpt
new file mode 100755
index 0000000000..537657d73c
--- /dev/null
+++ b/ext/sqlite/tests/sqlite_002.phpt
@@ -0,0 +1,29 @@
+--TEST--
+sqlite: Simple insert/select
+--SKIPIF--
+<?php # vim:ft=php
+if (!extension_loaded("sqlite")) print "skip"; ?>
+--FILE--
+<?php
+include "blankdb.inc";
+
+sqlite_query("CREATE TABLE foo(c1 date, c2 time, c3 varchar(64))", $db);
+sqlite_query("INSERT INTO foo VALUES ('2002-01-02', '12:49:00', NULL)", $db);
+$r = sqlite_query("SELECT * from foo", $db);
+var_dump(sqlite_fetch_array($r));
+?>
+--EXPECT--
+array(6) {
+ [0]=>
+ string(10) "2002-01-02"
+ ["c1"]=>
+ string(10) "2002-01-02"
+ [1]=>
+ string(8) "12:49:00"
+ ["c2"]=>
+ string(8) "12:49:00"
+ [2]=>
+ NULL
+ ["c3"]=>
+ NULL
+}