function IntegerFormatterTest::testClone in Currency 7.2
Test cloning.
File
- currency/
vendor/ bartfeenstra/ cldr/ src/ BartFeenstra/ Tests/ CLDR/ IntegerFormatterTest.php, line 22 - Contains class \BartFeenstra\Tests\CLDR\IntegerFormatterTest.
Class
Namespace
BartFeenstra\Tests\CLDRCode
function testClone() {
$formatter = new TestIntegerFormatter('#,##0.00;#,##0.00-', array(
IntegerFormatter::SYMBOL_SPECIAL_GROUPING_SEPARATOR => '.',
));
$formatter_clone = clone $formatter;
$symbols = $formatter
->get('symbols');
$symbols[IntegerFormatter::POSITIVE][0]->symbol = 'AAA';
$symbols_clone = $formatter_clone
->get('symbols');
$this
->assertNotSame($symbols[IntegerFormatter::POSITIVE][0]->symbol, $symbols_clone[IntegerFormatter::POSITIVE][0]->symbol, 'When an IntegerFormatter is cloned, so are its NumberPatternSymbol elements.');
}