Annotation of embedaddon/php/ext/standard/tests/math/octdec_error.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test octdec() - wrong params  test octdec()
                      3: --FILE--
                      4: <?php
                      5: /* Prototype  : number octdec  ( string $octal_string  )
                      6:  * Description: Returns the decimal equivalent of the octal number represented by the octal_string  argument. 
                      7:  * Source code: ext/standard/math.c
                      8:  */
                      9: 
                     10: echo "*** Testing octdec() :  error conditions ***\n";
                     11: 
                     12: // get a class
                     13: class classA
                     14: {
                     15: }
                     16: 
                     17: echo "\n-- Incorrect number of arguments --\n"; 
                     18: octdec();
                     19: octdec('0123567',true);
                     20: 
                     21: echo "\n-- Incorrect input --\n";
                     22: octdec(new classA());
                     23: 
                     24: 
                     25: ?>
                     26: --EXPECTF--
                     27: *** Testing octdec() :  error conditions ***
                     28: 
                     29: -- Incorrect number of arguments --
                     30: 
                     31: Warning: octdec() expects exactly 1 parameter, 0 given in %s on line %d
                     32: 
                     33: Warning: octdec() expects exactly 1 parameter, 2 given in %s on line %d
                     34: 
                     35: -- Incorrect input --
                     36: 
                     37: Catchable fatal error: Object of class classA could not be converted to string in %s on line %d

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