]> granicus.if.org Git - php/commitdiff
Add test for this bug report; can't repeat the problem.
authorWez Furlong <wez@php.net>
Sat, 10 Sep 2005 19:27:29 +0000 (19:27 +0000)
committerWez Furlong <wez@php.net>
Sat, 10 Sep 2005 19:27:29 +0000 (19:27 +0000)
ext/pdo_mysql/tests/pecl_bug_5200.phpt [new file with mode: 0644]

diff --git a/ext/pdo_mysql/tests/pecl_bug_5200.phpt b/ext/pdo_mysql/tests/pecl_bug_5200.phpt
new file mode 100644 (file)
index 0000000..41e41f4
--- /dev/null
@@ -0,0 +1,30 @@
+--TEST--
+PDO MySQL PECL Bug #5200
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded');
+require 'ext/pdo_mysql/tests/config.inc';
+require 'ext/pdo/tests/pdo_test.inc';
+PDOTest::skip();
+?>
+--FILE--
+<?php
+require 'ext/pdo/tests/pdo_test.inc';
+$db = PDOTest::test_factory('ext/pdo_mysql/tests/common.phpt');
+
+$db->exec("CREATE TABLE test (bar INT NOT NULL, phase enum('please_select', 'I', 'II', 'IIa', 'IIb', 'III', 'IV'))");
+
+foreach ($db->query('DESCRIBE test phase')->fetchAll(PDO_FETCH_ASSOC) as $row) {
+       print_r($row);
+}
+
+--EXPECT--
+Array
+(
+    [field] => phase
+    [type] => enum('please_select','I','II','IIa','IIb','III','IV')
+    [null] => YES
+    [key] => 
+    [default] => 
+    [extra] => 
+)