summaryrefslogtreecommitdiff
path: root/ext/intl/tests/dateformat_clone_bad_obj.phpt
blob: 3425a1b0f808353aea3d25dc2d1d8ce18bf9659d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--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"