diff options
Diffstat (limited to 'ext/pdo/tests')
| -rwxr-xr-x | ext/pdo/tests/pdo.inc | 20 | ||||
| -rw-r--r-- | ext/pdo/tests/pdo_036.phpt | 21 |
2 files changed, 31 insertions, 10 deletions
diff --git a/ext/pdo/tests/pdo.inc b/ext/pdo/tests/pdo.inc index 9bf6d5974..8089236bb 100755 --- a/ext/pdo/tests/pdo.inc +++ b/ext/pdo/tests/pdo.inc @@ -1,10 +1,10 @@ -<?php
-
-function set_sql($name, $query)
-{
- if (empty($GLOBALS['SQL'][$name]))
- {
- $GLOBALS['SQL'][$name] = $query;
- }
-}
-?>
+<?php + +function set_sql($name, $query) +{ + if (empty($GLOBALS['SQL'][$name])) + { + $GLOBALS['SQL'][$name] = $query; + } +} +?> diff --git a/ext/pdo/tests/pdo_036.phpt b/ext/pdo/tests/pdo_036.phpt new file mode 100644 index 000000000..6bd38cb06 --- /dev/null +++ b/ext/pdo/tests/pdo_036.phpt @@ -0,0 +1,21 @@ +--TEST-- +Testing PDORow and PDOStatement instances with Reflection +--FILE-- +<?php + +$instance = new reflectionclass('pdorow'); +$x = $instance->newInstance(); +var_dump($x); + +$instance = new reflectionclass('pdostatement'); +$x = $instance->newInstance(); +var_dump($x); + +?> +--EXPECTF-- +object(PDORow)#%d (0) { +} +object(PDOStatement)#%d (1) { + [%u|b%"queryString"]=> + NULL +} |
