mirror of
https://github.com/php/php-src.git
synced 2024-12-04 23:34:25 +08: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.
18 lines
510 B
PHP
18 lines
510 B
PHP
--TEST--
|
|
DatePeriod: Test wrong __construct parameter
|
|
--CREDITS--
|
|
Havard Eide <nucleuz@gmail.com>
|
|
#PHPTestFest2009 Norway 2009-06-09 \o/
|
|
--INI--
|
|
date.timezone=UTC
|
|
--FILE--
|
|
<?php
|
|
new DatePeriod();
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught Exception: DatePeriod::__construct(): This constructor accepts either (DateTimeInterface, DateInterval, int) OR (DateTimeInterface, DateInterval, DateTime) OR (string) as arguments. in %s:%d
|
|
Stack trace:
|
|
#0 %s(%d): DatePeriod->__construct()
|
|
#1 {main}
|
|
thrown in %s on line %d
|