diff options
Diffstat (limited to 'ext/sqlite3/tests/sqlite3_02_create.phpt')
-rw-r--r-- | ext/sqlite3/tests/sqlite3_02_create.phpt | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/ext/sqlite3/tests/sqlite3_02_create.phpt b/ext/sqlite3/tests/sqlite3_02_create.phpt new file mode 100644 index 0000000..5a1aa71 --- /dev/null +++ b/ext/sqlite3/tests/sqlite3_02_create.phpt @@ -0,0 +1,34 @@ +--TEST-- +SQLite3::query CREATE tests +--SKIPIF-- +<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +--FILE-- +<?php + +require_once(dirname(__FILE__) . '/new_db.inc'); + +echo "Creating Table\n"; +var_dump($db->exec('CREATE TABLE test (time INTEGER, id STRING)')); + +echo "Creating Same Table Again\n"; +var_dump($db->exec('CREATE TABLE test (time INTEGER, id STRING)')); + +echo "Dropping database\n"; +var_dump($db->exec('DROP TABLE test')); + +echo "Closing database\n"; +var_dump($db->close()); +echo "Done\n"; +?> +--EXPECTF-- +Creating Table +bool(true) +Creating Same Table Again + +Warning: SQLite3::exec(): table test already exists in %s on line %d +bool(false) +Dropping database +bool(true) +Closing database +bool(true) +Done |