mirror of
https://github.com/php/php-src.git
synced 2024-09-30 22:36:12 +00:00
3ae995f03c
This implements a reduced variant of #1226 with just the following change: -Fatal error: Uncaught exception 'EngineException' with message 'Call to private method foo::bar() from context ''' in %s:%d +Fatal error: Uncaught EngineException: Call to private method foo::bar() from context '' in %s:%d The '' wrapper around messages is very weird if the exception message itself contains ''. Futhermore having the message wrapped in '' doesn't work for the "and defined" suffix of TypeExceptions.
29 lines
659 B
PHP
29 lines
659 B
PHP
--TEST--
|
|
Testing PDORow and PDOStatement instances with Reflection
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded('pdo')) die('skip'); ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$instance = new reflectionclass('pdostatement');
|
|
$x = $instance->newInstance();
|
|
var_dump($x);
|
|
|
|
$instance = new reflectionclass('pdorow');
|
|
$x = $instance->newInstance();
|
|
var_dump($x);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
object(PDOStatement)#%d (1) {
|
|
[%u|b%"queryString"]=>
|
|
NULL
|
|
}
|
|
|
|
Fatal error: Uncaught PDOException: You may not create a PDORow manually in %spdo_036.php:8
|
|
Stack trace:
|
|
#0 [internal function]: PDORow->__construct()
|
|
#1 %spdo_036.php(8): ReflectionClass->newInstance()
|
|
#2 {main}
|
|
thrown in %spdo_036.php on line 8
|