Annotation of embedaddon/php/ext/pdo/tests/pecl_bug_5809.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: PDO Common: PECL Bug #5809 (PDOStatement::execute(array()) changes param)
! 3: --SKIPIF--
! 4: <?php # vim:ft=php:
! 5: if (!extension_loaded('pdo')) die('skip');
! 6: $dir = getenv('REDIR_TEST_DIR');
! 7: if (false == $dir) die('skip no driver');
! 8: require_once $dir . 'pdo_test.inc';
! 9: PDOTest::skip();
! 10: ?>
! 11: --FILE--
! 12: <?php
! 13: if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/');
! 14: require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc';
! 15: $db = PDOTest::factory();
! 16:
! 17: $db->exec("CREATE TABLE test (id int NOT NULL, PRIMARY KEY (id))");
! 18: $db->exec("INSERT INTO test (id) VALUES (1)");
! 19:
! 20: $values = array(1);
! 21: var_dump($values);
! 22: $stmt = $db->prepare('SELECT * FROM test WHERE id = ?');
! 23: $stmt->execute($values);
! 24: var_dump($values);
! 25:
! 26: --EXPECT--
! 27: array(1) {
! 28: [0]=>
! 29: int(1)
! 30: }
! 31: array(1) {
! 32: [0]=>
! 33: int(1)
! 34: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>