File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / tests / output / ob_end_clean_basic_001.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:06 2012 UTC (12 years, 5 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

    1: --TEST--
    2: Test return type and value, as well as basic behaviour, for ob_end_clean()
    3: --FILE--
    4: <?php
    5: /* 
    6:  * proto bool ob_end_clean(void)
    7:  * Function is implemented in main/output.c
    8: */ 
    9: 
   10: var_dump(ob_end_clean());
   11: 
   12: ob_start();
   13: var_dump(ob_end_clean());
   14: 
   15: ob_start();
   16: echo "Hello";
   17: var_dump(ob_end_clean());
   18: 
   19: var_dump(ob_end_clean());
   20: 
   21: ?>
   22: --EXPECTF--
   23: 
   24: Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in %s on line 7
   25: bool(false)
   26: bool(true)
   27: bool(true)
   28: 
   29: Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in %s on line 16
   30: bool(false)
   31: 

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