Annotation of embedaddon/php/ext/intl/tests/symfony_format_type_int32_intl3.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Symfony StubNumberFormatterTest#testFormatTypeInt32Intl #3
                      3: --SKIPIF--
                      4: <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
                      5: --FILE--
                      6: <?php
                      7: 
                      8: 
                      9: // PHP Unit's code to unserialize data passed as args to #testFormatTypeInt32Intl
                     10: $unit_test_args = unserialize('a:4:{i:0;O:15:"NumberFormatter":0:{}i:1;d:2147483648;i:2;s:14:"-2,147,483,648";i:3;s:83:"->format() TYPE_INT32 formats inconsistently an integer if out of the 32 bit range.";}');
                     11: 
                     12: var_dump($unit_test_args);
                     13: 
                     14: // execute the code from #testFormatTypeInt32Intl
                     15: $unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT32);
                     16: 
                     17: echo "== didn't crash ==".PHP_EOL;
                     18: 
                     19: ?>
                     20: --EXPECT--
                     21: array(4) {
                     22:   [0]=>
                     23:   object(NumberFormatter)#1 (0) {
                     24:   }
                     25:   [1]=>
                     26:   float(2147483648)
                     27:   [2]=>
                     28:   string(14) "-2,147,483,648"
                     29:   [3]=>
                     30:   string(83) "->format() TYPE_INT32 formats inconsistently an integer if out of the 32 bit range."
                     31: }
                     32: == didn't crash ==

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>