summaryrefslogtreecommitdiff
path: root/ext/db/tests
diff options
context:
space:
mode:
authorSVN Migration <svn@php.net>2003-02-27 17:43:39 +0000
committerSVN Migration <svn@php.net>2003-02-27 17:43:39 +0000
commit078bcec0997ad0e07b720c43cc9e6d0e046a75ab (patch)
tree36cb0f6be2ef078fe3374de8c087b93ecf82f812 /ext/db/tests
parentfd61f69077f6156ca71dde60ecfd9ed9765a02db (diff)
downloadphp-git-PHP-5.tar.gz
This commit was manufactured by cvs2svn to create branch 'PHP_5'.PHP-5
Diffstat (limited to 'ext/db/tests')
-rw-r--r--ext/db/tests/001.phpt16
-rw-r--r--ext/db/tests/002.phpt17
-rw-r--r--ext/db/tests/003.phpt20
-rw-r--r--ext/db/tests/004.phpt23
-rw-r--r--ext/db/tests/005.phpt27
-rw-r--r--ext/db/tests/006.phpt29
-rw-r--r--ext/db/tests/test.inc3
7 files changed, 0 insertions, 135 deletions
diff --git a/ext/db/tests/001.phpt b/ext/db/tests/001.phpt
deleted file mode 100644
index a18e79a82b..0000000000
--- a/ext/db/tests/001.phpt
+++ /dev/null
@@ -1,16 +0,0 @@
---TEST--
-DBM File Creation Test
---SKIPIF--
-<?php if (!extension_loaded("db")) print "skip"; ?>
---FILE--
-<?php
- require_once('test.inc');
- if (dbmopen($db_file, "n") && file_exists($db_file)) {
- echo "database file created\n";
- } else {
- echo "$db_file does not exist\n";
- }
- dbmclose($db_file);
-?>
---EXPECT--
-database file created \ No newline at end of file
diff --git a/ext/db/tests/002.phpt b/ext/db/tests/002.phpt
deleted file mode 100644
index 3c797370c5..0000000000
--- a/ext/db/tests/002.phpt
+++ /dev/null
@@ -1,17 +0,0 @@
---TEST--
-DBM Insert/Fetch Test
---SKIPIF--
-<?php if (!extension_loaded("db")) print "skip";?>
---FILE--
-<?php
- require_once('test.inc');
- if (dbmopen($db_file, "n")) {
- dbminsert($db_file, "key1", "This is a test insert");
- echo dbmfetch($db_file, "key1");
- dbmclose($db_file);
- } else {
- echo "Error creating database\n";
- }
-?>
---EXPECT--
-This is a test insert
diff --git a/ext/db/tests/003.phpt b/ext/db/tests/003.phpt
deleted file mode 100644
index 6d3f7d3611..0000000000
--- a/ext/db/tests/003.phpt
+++ /dev/null
@@ -1,20 +0,0 @@
---TEST--
-DBM Insert/Replace/Fetch Test
---SKIPIF--
-<?php if (!extension_loaded("db")) print "skip"; ?>
---FILE--
-<?php
- require_once('test.inc');
- if (dbmopen($db_file, "n")) {
- dbminsert($db_file, "key1", "This is a test insert");
- dbmreplace($db_file, "key1", "This is the replacement text");
- @dbminsert($db_file, "key1", "This is another replacement text?");
- $a = dbmfetch($db_file, "key1");
- dbmclose($db_file);
- echo $a;
- } else {
- echo "Error creating database\n";
- }
-?>
---EXPECT--
-This is the replacement text
diff --git a/ext/db/tests/004.phpt b/ext/db/tests/004.phpt
deleted file mode 100644
index 4c19a38fe6..0000000000
--- a/ext/db/tests/004.phpt
+++ /dev/null
@@ -1,23 +0,0 @@
---TEST--
-DBM Multiple Insert/Fetch Test
---SKIPIF--
-<?php if (!extension_loaded("db")) print "skip"; ?>
---FILE--
-<?php
- require_once('test.inc');
- if (dbmopen($db_file, "n")) {
- dbminsert($db_file, "key1", "Content String 1");
- dbminsert($db_file, "key2", "Content String 2");
- dbminsert($db_file, "key3", "Third Content String");
- dbminsert($db_file, "key4", "Another Content String");
- dbminsert($db_file, "key5", "The last content string");
- $a = dbmfetch($db_file, "key4");
- $b = dbmfetch($db_file, "key2");
- dbmclose($db_file);
- echo "$a $b";
- } else {
- echo "Error creating database\n";
- }
-?>
---EXPECT--
-Another Content String Content String 2
diff --git a/ext/db/tests/005.phpt b/ext/db/tests/005.phpt
deleted file mode 100644
index 6105f533d8..0000000000
--- a/ext/db/tests/005.phpt
+++ /dev/null
@@ -1,27 +0,0 @@
---TEST--
-DBM FirstKey/NextKey Loop Test With 5 Items
---SKIPIF--
-<?php if (!extension_loaded("db")) print "skip"; ?>
---FILE--
-<?php
- require_once('test.inc');
- if (dbmopen($db_file, "n")) {
- dbminsert($db_file, "key1", "Content String 1");
- dbminsert($db_file, "key2", "Content String 2");
- dbminsert($db_file, "key3", "Third Content String");
- dbminsert($db_file, "key4", "Another Content String");
- dbminsert($db_file, "key5", "The last content string");
- $a = dbmfirstkey($db_file);
- $i=0;
- while($a) {
- $a = dbmnextkey($db_file, $a);
- $i++;
- }
- dbmclose($db_file);
- echo $i;
- } else {
- echo "Error creating database\n";
- }
-?>
---EXPECT--
-5
diff --git a/ext/db/tests/006.phpt b/ext/db/tests/006.phpt
deleted file mode 100644
index c5ffd597ca..0000000000
--- a/ext/db/tests/006.phpt
+++ /dev/null
@@ -1,29 +0,0 @@
---TEST--
-DBM FirstKey/NextKey with 2 deletes
---SKIPIF--
-<?php if (!extension_loaded("db")) print "skip"; ?>
---FILE--
-<?php
- require_once('test.inc');
- if (dbmopen($db_file, "n")) {
- dbminsert($db_file, "key1", "Content String 1");
- dbminsert($db_file, "key2", "Content String 2");
- dbminsert($db_file, "key3", "Third Content String");
- dbminsert($db_file, "key4", "Another Content String");
- dbminsert($db_file, "key5", "The last content string");
- dbmdelete($db_file, "key3");
- dbmdelete($db_file, "key1");
- $a = dbmfirstkey($db_file);
- $i=0;
- while($a) {
- $a = dbmnextkey($db_file, $a);
- $i++;
- }
- dbmclose($db_file);
- echo $i;
- } else {
- echo "Error creating database\n";
- }
-?>
---EXPECT--
-3
diff --git a/ext/db/tests/test.inc b/ext/db/tests/test.inc
deleted file mode 100644
index 1e384aa835..0000000000
--- a/ext/db/tests/test.inc
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
- $db_file = dirname(__FILE__).'/test.dbm';
-?>