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

21 lines
345 B
PHP

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