php-src/ext/pdo/tests/pdorow.phpt
Nikita Popov 3ae995f03c Tweak uncaught exception message display
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.
2015-05-17 18:47:06 +02:00

17 lines
351 B
PHP

--TEST--
Trying instantiate a PDORow object manually
--SKIPIF--
<?php if (!extension_loaded('pdo')) die('skip'); ?>
--FILE--
<?php
new PDORow;
?>
--EXPECTF--
Fatal error: Uncaught PDOException: You may not create a PDORow manually in %spdorow.php:3
Stack trace:
#0 %spdorow.php(3): PDORow->__construct()
#1 {main}
thrown in %spdorow.php on line 3