From 30c916f21a261b5d205d8bd2da04825f1b2879e0 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Wed, 6 Jul 2005 13:19:25 +0000 Subject: rename pdo_test.php to pdo_test.inc, add it, and update tests. --- ext/pdo/tests/pdo_001.phpt | 2 +- ext/pdo/tests/pdo_002.phpt | 2 +- ext/pdo/tests/pdo_003.phpt | 2 +- ext/pdo/tests/pdo_004.phpt | 2 +- ext/pdo/tests/pdo_005.phpt | 2 +- ext/pdo/tests/pdo_006.phpt | 2 +- ext/pdo/tests/pdo_007.phpt | 2 +- ext/pdo/tests/pdo_008.phpt | 2 +- ext/pdo/tests/pdo_009.phpt | 2 +- ext/pdo/tests/pdo_010.phpt | 2 +- ext/pdo/tests/pdo_011.phpt | 2 +- ext/pdo/tests/pdo_012.phpt | 2 +- ext/pdo/tests/pdo_013.phpt | 2 +- ext/pdo/tests/pdo_014.phpt | 2 +- ext/pdo/tests/pdo_015.phpt | 2 +- ext/pdo/tests/pdo_016.phpt | 2 +- ext/pdo/tests/pdo_017.phpt | 2 +- ext/pdo/tests/pdo_018.phpt | 2 +- ext/pdo/tests/pdo_019.phpt | 2 +- ext/pdo/tests/pdo_020.phpt | 2 +- ext/pdo/tests/pdo_021.phpt | 2 +- ext/pdo/tests/pdo_022.phpt | 2 +- ext/pdo/tests/pdo_023.phpt | 2 +- ext/pdo/tests/pdo_024.phpt | 2 +- ext/pdo/tests/pdo_025.phpt | 2 +- ext/pdo/tests/pdo_026.phpt | 2 +- ext/pdo/tests/pdo_test.inc | 37 +++++++++++++++++++++++++++++++++++++ 27 files changed, 63 insertions(+), 26 deletions(-) create mode 100644 ext/pdo/tests/pdo_test.inc (limited to 'ext/pdo') diff --git a/ext/pdo/tests/pdo_001.phpt b/ext/pdo/tests/pdo_001.phpt index 559ca6ccea..e2f049218e 100644 --- a/ext/pdo/tests/pdo_001.phpt +++ b/ext/pdo/tests/pdo_001.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('pdo')) print 'skip'; if (false == getenv('REDIR_TEST_DIR')) print 'skip no driver'; ?> --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_002.phpt b/ext/pdo/tests/pdo_002.phpt index 115c80dfcc..88f2473d90 100644 --- a/ext/pdo/tests/pdo_002.phpt +++ b/ext/pdo/tests/pdo_002.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('pdo')) print 'skip'; if (false == getenv('REDIR_TEST_DIR')) print 'skip no driver'; ?> --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_003.phpt b/ext/pdo/tests/pdo_003.phpt index b800bae5a5..56e3f2f0a0 100644 --- a/ext/pdo/tests/pdo_003.phpt +++ b/ext/pdo/tests/pdo_003.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('pdo')) print 'skip'; if (false == getenv('REDIR_TEST_DIR')) print 'skip no driver'; ?> --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_004.phpt b/ext/pdo/tests/pdo_004.phpt index 897deb4458..ee7c065967 100644 --- a/ext/pdo/tests/pdo_004.phpt +++ b/ext/pdo/tests/pdo_004.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('pdo')) print 'skip'; if (false == getenv('REDIR_TEST_DIR')) print 'skip no driver'; ?> --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_005.phpt b/ext/pdo/tests/pdo_005.phpt index c82f267093..71a2c32567 100644 --- a/ext/pdo/tests/pdo_005.phpt +++ b/ext/pdo/tests/pdo_005.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('pdo')) print 'skip'; if (false == getenv('REDIR_TEST_DIR')) print 'skip no driver'; ?> --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10), val2 VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_006.phpt b/ext/pdo/tests/pdo_006.phpt index 2de877afba..06b16d0fb4 100644 --- a/ext/pdo/tests/pdo_006.phpt +++ b/ext/pdo/tests/pdo_006.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('pdo')) print 'skip'; if (false == getenv('REDIR_TEST_DIR')) print 'skip no driver'; ?> --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_007.phpt b/ext/pdo/tests/pdo_007.phpt index ec33d652fc..a8c873447f 100644 --- a/ext/pdo/tests/pdo_007.phpt +++ b/ext/pdo/tests/pdo_007.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('pdo')) print 'skip'; if (false == getenv('REDIR_TEST_DIR')) print 'skip no driver'; ?> --FILE-- exec('CREATE TABLE test(id CHAR(1) NOT NULL PRIMARY KEY, val VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_008.phpt b/ext/pdo/tests/pdo_008.phpt index 06d07cf661..2528f790aa 100644 --- a/ext/pdo/tests/pdo_008.phpt +++ b/ext/pdo/tests/pdo_008.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('pdo')) print 'skip'; if (false == getenv('REDIR_TEST_DIR')) print 'skip no driver'; ?> --FILE-- exec('CREATE TABLE test(id CHAR(1) NOT NULL PRIMARY KEY, val VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_009.phpt b/ext/pdo/tests/pdo_009.phpt index cce08de621..5194ff4e96 100644 --- a/ext/pdo/tests/pdo_009.phpt +++ b/ext/pdo/tests/pdo_009.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('pdo')) print 'skip'; if (false == getenv('REDIR_TEST_DIR')) print 'skip no driver'; ?> --FILE-- exec('CREATE TABLE classtypes(id int NOT NULL PRIMARY KEY, name VARCHAR(10) UNIQUE)'); diff --git a/ext/pdo/tests/pdo_010.phpt b/ext/pdo/tests/pdo_010.phpt index b9ea3ce634..8898f06702 100644 --- a/ext/pdo/tests/pdo_010.phpt +++ b/ext/pdo/tests/pdo_010.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('pdo')) print 'skip'; if (false == getenv('REDIR_TEST_DIR')) print 'skip no driver'; ?> --FILE-- exec('CREATE TABLE classtypes(id int NOT NULL PRIMARY KEY, name VARCHAR(10) UNIQUE)'); diff --git a/ext/pdo/tests/pdo_011.phpt b/ext/pdo/tests/pdo_011.phpt index 211468fc44..145772c6b5 100644 --- a/ext/pdo/tests/pdo_011.phpt +++ b/ext/pdo/tests/pdo_011.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('pdo')) print 'skip'; if (false == getenv('REDIR_TEST_DIR')) print 'skip no driver'; ?> --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10), grp VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_012.phpt b/ext/pdo/tests/pdo_012.phpt index 6cc6320759..b052c9cf05 100644 --- a/ext/pdo/tests/pdo_012.phpt +++ b/ext/pdo/tests/pdo_012.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('pdo')) print 'skip'; if (false == getenv('REDIR_TEST_DIR')) print 'skip no driver'; ?> --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10), grp VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_013.phpt b/ext/pdo/tests/pdo_013.phpt index d3c33f3624..eb420e69bc 100644 --- a/ext/pdo/tests/pdo_013.phpt +++ b/ext/pdo/tests/pdo_013.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('pdo')) print 'skip'; if (false == getenv('REDIR_TEST_DIR')) print 'skip no driver'; ?> --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10), grp VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_014.phpt b/ext/pdo/tests/pdo_014.phpt index 0a3f385369..8c4e66fa6a 100644 --- a/ext/pdo/tests/pdo_014.phpt +++ b/ext/pdo/tests/pdo_014.phpt @@ -9,7 +9,7 @@ if (!class_exists('IteratorIterator')) print 'skip IteratorIterator class not pr ?> --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10), grp VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_015.phpt b/ext/pdo/tests/pdo_015.phpt index 49f3306280..4491f2baec 100644 --- a/ext/pdo/tests/pdo_015.phpt +++ b/ext/pdo/tests/pdo_015.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('pdo')) print 'skip'; if (false == getenv('REDIR_TEST_DIR')) print 'skip no driver'; ?> --FILE-- exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10), val2 VARCHAR(20))'); diff --git a/ext/pdo/tests/pdo_016.phpt b/ext/pdo/tests/pdo_016.phpt index fb67d16677..54923217af 100644 --- a/ext/pdo/tests/pdo_016.phpt +++ b/ext/pdo/tests/pdo_016.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('pdo')) print 'skip'; if (false == getenv('REDIR_TEST_DIR')) print 'skip no driver'; ?> --FILE-- exec('CREATE TABLE test(idx int NOT NULL PRIMARY KEY, txt VARCHAR(20))'); diff --git a/ext/pdo/tests/pdo_017.phpt b/ext/pdo/tests/pdo_017.phpt index 5fb205c98f..f0165fd342 100644 --- a/ext/pdo/tests/pdo_017.phpt +++ b/ext/pdo/tests/pdo_017.phpt @@ -16,7 +16,7 @@ try { ?> --FILE-- exec('CREATE TABLE test(id INT NOT NULL PRIMARY KEY, val VARCHAR(10))'); diff --git a/ext/pdo/tests/pdo_018.phpt b/ext/pdo/tests/pdo_018.phpt index 68209e1c83..a0bfdf0f99 100644 --- a/ext/pdo/tests/pdo_018.phpt +++ b/ext/pdo/tests/pdo_018.phpt @@ -8,7 +8,7 @@ if (!interface_exists('Serializable')) print 'skip no Serializable interface'; ?> --FILE-- --FILE-- exec('CREATE TABLE test(idx int NOT NULL PRIMARY KEY, txt VARCHAR(20))'); diff --git a/ext/pdo/tests/pdo_020.phpt b/ext/pdo/tests/pdo_020.phpt index c1aaff0c44..8bce047bb2 100644 --- a/ext/pdo/tests/pdo_020.phpt +++ b/ext/pdo/tests/pdo_020.phpt @@ -7,7 +7,7 @@ if (false == getenv('REDIR_TEST_DIR')) print 'skip no driver'; ?> --FILE-- exec('CREATE TABLE test(id INT NOT NULL PRIMARY KEY, val VARCHAR(10), val2 VARCHAR(16))'); diff --git a/ext/pdo/tests/pdo_021.phpt b/ext/pdo/tests/pdo_021.phpt index 341c2ff3b5..71615725e9 100644 --- a/ext/pdo/tests/pdo_021.phpt +++ b/ext/pdo/tests/pdo_021.phpt @@ -7,7 +7,7 @@ if (false == getenv('REDIR_TEST_DIR')) print 'skip no driver'; ?> --FILE-- exec('CREATE TABLE test(id INT NOT NULL PRIMARY KEY, val VARCHAR(10), val2 VARCHAR(16))')); diff --git a/ext/pdo/tests/pdo_022.phpt b/ext/pdo/tests/pdo_022.phpt index 0341a1f7b5..2eb1fe73ae 100644 --- a/ext/pdo/tests/pdo_022.phpt +++ b/ext/pdo/tests/pdo_022.phpt @@ -17,7 +17,7 @@ if (false == getenv('REDIR_TEST_DIR')) print 'skip no driver'; ?> --FILE-- exec('CREATE TABLE test(id INT NOT NULL PRIMARY KEY, val VARCHAR(10), val2 VARCHAR(16))'); diff --git a/ext/pdo/tests/pdo_023.phpt b/ext/pdo/tests/pdo_023.phpt index 96df22cd21..4cc4437979 100644 --- a/ext/pdo/tests/pdo_023.phpt +++ b/ext/pdo/tests/pdo_023.phpt @@ -7,7 +7,7 @@ if (false == getenv('REDIR_TEST_DIR')) print 'skip no driver'; ?> --FILE-- --FILE-- exec('create table test (id int, name varchar(10))'); diff --git a/ext/pdo/tests/pdo_025.phpt b/ext/pdo/tests/pdo_025.phpt index d43296bbe0..b41c62ffc7 100644 --- a/ext/pdo/tests/pdo_025.phpt +++ b/ext/pdo/tests/pdo_025.phpt @@ -7,7 +7,7 @@ if (false == getenv('REDIR_TEST_DIR')) print 'skip no driver'; ?> --FILE-- exec('CREATE TABLE test(id INT NOT NULL PRIMARY KEY, val VARCHAR(10), val2 VARCHAR(16))'); diff --git a/ext/pdo/tests/pdo_026.phpt b/ext/pdo/tests/pdo_026.phpt index 8e3cb7715c..0c8ba68871 100644 --- a/ext/pdo/tests/pdo_026.phpt +++ b/ext/pdo/tests/pdo_026.phpt @@ -7,7 +7,7 @@ if (false == getenv('REDIR_TEST_DIR')) print 'skip no driver'; ?> --FILE-- exec("DROP TABLE $table"); + } + + $db->setAttribute(PDO_ATTR_ERRMODE, PDO_ERRMODE_WARNING); + return $db; + } +} + + + +?> -- cgit v1.2.1