Annotation of embedaddon/php/ext/intl/tests/symfony_format_type_int32_intl2.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Symfony StubNumberFormatterTest#testFormatTypeInt32Intl #2
3: --SKIPIF--
4: <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
5: --FILE--
6: <?php
7:
8: // StubNumberFormatterTest#testFormatTypeInt32Intl is tested many times, each with different args.
9: // there are 7 sets of args that crash PHP (and other args that don't), each of those 7 is now a separate PHPT test
10: // to ensure that each of the 7 args are always tested.
11:
12: // PHP Unit's code to unserialize data passed as args to #testFormatTypeInt32Intl
13: $unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;d:1.1000000000000001;i:2;s:1:"1";}');
14:
15: var_dump($unit_test_args);
16:
17: // execute the code from #testFormatTypeInt32Intl
18: $unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT32);
19:
20: echo "== didn't crash ==".PHP_EOL;
21:
22: ?>
23: --EXPECT--
24: array(3) {
25: [0]=>
26: object(NumberFormatter)#1 (0) {
27: }
28: [1]=>
29: float(1.1)
30: [2]=>
31: string(1) "1"
32: }
33: == didn't crash ==
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>