From: Marcus Boerger Date: Thu, 11 May 2006 22:17:42 +0000 (+0000) Subject: - MFH: add new test X-Git-Tag: php-5.2.0RC1~581 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bf9f762b4d5dc146920db00aa274d0d3f9962331;p=php - MFH: add new test --- diff --git a/ext/pdo/tests/bug_36428.phpt b/ext/pdo/tests/bug_36428.phpt new file mode 100755 index 0000000000..77dcdd0c50 --- /dev/null +++ b/ext/pdo/tests/bug_36428.phpt @@ -0,0 +1,42 @@ +--TEST-- +PDO Common: PHP Bug #36428: Incorrect error message for PDO::fetchAll +--SKIPIF-- + +--FILE-- +exec("CREATE TABLE test (a VARCHAR(10))"); +$db->exec("INSERT INTO test (a) VALUES ('xyz')"); +$res = $db->query("SELECT a FROM test"); +var_dump($res->fetchAll(PDO::FETCH_CLASS|PDO::FETCH_PROPS_LATE, 'SimpleXMLElement', array(''))); + +?> +===DONE=== +--EXPECTF-- +array(1) { + [0]=> + object(SimpleXMLElement)#%d (1) { + ["a"]=> + string(3) "xyz" + } +} +===DONE=== +--UEXPECTF-- +array(1) { + [0]=> + object(SimpleXMLElement)#3 (1) { + [u"a"]=> + unicode(3) "xyz" + } +} +===DONE===