Annotation of embedaddon/php/ext/standard/tests/strings/strcoll_error.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test strcoll() function : error conditions 
                      3: --FILE--
                      4: <?php
                      5: /* Prototype: int strcoll  ( string $str1  , string $str2  )
                      6:    Description: Locale based string comparison
                      7: */
                      8: 
                      9: echo "*** Testing strcoll() : error conditions ***\n";
                     10: 
                     11: echo "\n-- Testing strcoll() function with no arguments --\n";
                     12: var_dump( strcoll() );
                     13: var_dump( strcoll("") );
                     14: 
                     15: echo "\n-- Testing strcoll() function with one argument --\n";
                     16: var_dump( strcoll("Hello World") );  
                     17: 
                     18: echo "\n-- Testing strcoll() function with more than expected no. of arguments --\n";
                     19: $extra_arg = 10;
                     20: var_dump( strcoll("Hello World",  "World", $extra_arg) );
                     21: 
                     22: ?>
                     23: ===Done===
                     24: --EXPECTF--
                     25: *** Testing strcoll() : error conditions ***
                     26: 
                     27: -- Testing strcoll() function with no arguments --
                     28: 
                     29: Warning: strcoll() expects exactly 2 parameters, 0 given in %s on line %d
                     30: NULL
                     31: 
                     32: Warning: strcoll() expects exactly 2 parameters, 1 given in %s on line %d
                     33: NULL
                     34: 
                     35: -- Testing strcoll() function with one argument --
                     36: 
                     37: Warning: strcoll() expects exactly 2 parameters, 1 given in %s on line %d
                     38: NULL
                     39: 
                     40: -- Testing strcoll() function with more than expected no. of arguments --
                     41: 
                     42: Warning: strcoll() expects exactly 2 parameters, 3 given in %s on line %d
                     43: NULL
                     44: ===Done===

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