php-src/ext/intl/tests/dateformat_clone_bad_obj.phpt
2012-08-22 22:32:51 +02:00

21 lines
360 B
PHP

--TEST--
Cloning unconstructed IntlDateFormatter
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
--FILE--
<?php
class A extends IntlDateFormatter {
function __construct() {}
}
$a = new A;
try {
$b = clone $a;
} catch (Exception $e) {
var_dump($e->getMessage());
}
--EXPECTF--
string(%s) "Cannot clone unconstructed IntlDateFormatter"