Annotation of embedaddon/php/ext/standard/tests/general_functions/ob_get_flush_basic.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test ob_get_flush() function : basic functionality 
                      3: --INI--
                      4: output_buffering=0
                      5: --FILE--
                      6: <?php
                      7: /* Prototype  : bool ob_get_flush(void)
                      8:  * Description: Get current buffer contents, flush (send) the output buffer, and delete current output buffer 
                      9:  * Source code: main/output.c
                     10:  * Alias to functions: 
                     11:  */
                     12: 
                     13: echo "*** Testing ob_get_flush() : basic functionality ***\n";
                     14: 
                     15: ob_start();
                     16: 
                     17: echo "testing ob_get_flush() with some\nNewlines too\n";
                     18: $string = ob_get_flush();
                     19: 
                     20: var_dump( "this is printed before returning the string" );
                     21: var_dump( $string );
                     22: var_dump( ob_list_handlers() );
                     23: 
                     24: // Empty string expected
                     25: ob_start();
                     26: $string = ob_get_flush();
                     27: var_dump($string)
                     28: 
                     29: ?>
                     30: ===DONE===
                     31: --EXPECT--
                     32: *** Testing ob_get_flush() : basic functionality ***
                     33: testing ob_get_flush() with some
                     34: Newlines too
                     35: string(43) "this is printed before returning the string"
                     36: string(46) "testing ob_get_flush() with some
                     37: Newlines too
                     38: "
                     39: array(0) {
                     40: }
                     41: string(0) ""
                     42: ===DONE===

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