Annotation of embedaddon/php/tests/output/ob_start_error_002.phpt, revision 1.1.1.2

1.1       misho       1: --TEST--
                      2: Test wrong number of arguments and wrong arg types for ob_start()
                      3: --FILE--
                      4: <?php
                      5: /* 
                      6:  * proto bool ob_start([ string|array user_function [, int chunk_size [, bool erase]]])
                      7:  * Function is implemented in main/output.c
                      8: */ 
                      9: 
                     10: Class C {
                     11:        static function f($str) {
                     12:                return $str;
                     13:        }
                     14: }
                     15: 
                     16: var_dump(ob_start(array("nonExistent","f")));
                     17: var_dump(ob_start(array("C","nonExistent")));
                     18: var_dump(ob_start("C::no"));
                     19: var_dump(ob_start("no"));
                     20: echo "done"
                     21: ?>
                     22: --EXPECTF--
1.1.1.2 ! misho      23: Warning: ob_start(): class 'nonExistent' not found in %s on line 13
        !            24: 
        !            25: Notice: ob_start(): failed to create buffer in %s on line 13
1.1       misho      26: bool(false)
1.1.1.2 ! misho      27: 
        !            28: Warning: ob_start(): class 'C' does not have a method 'nonExistent' in %s on line 14
        !            29: 
        !            30: Notice: ob_start(): failed to create buffer in %s on line 14
1.1       misho      31: bool(false)
1.1.1.2 ! misho      32: 
        !            33: Warning: ob_start(): class 'C' does not have a method 'no' in %s on line 15
        !            34: 
        !            35: Notice: ob_start(): failed to create buffer in %s on line 15
1.1       misho      36: bool(false)
1.1.1.2 ! misho      37: 
        !            38: Warning: ob_start(): function 'no' not found or invalid function name in %s on line 16
        !            39: 
        !            40: Notice: ob_start(): failed to create buffer in %s on line 16
1.1       misho      41: bool(false)
1.1.1.2 ! misho      42: done

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