Annotation of embedaddon/php/ext/standard/tests/strings/get_html_translation_table_error.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test get_html_translation_table() function : error conditions 
        !             3: --FILE--
        !             4: <?php
        !             5: /* Prototype  : array get_html_translation_table ( [int $table [, int $quote_style [, string charset_hint]]] )
        !             6:  * Description: Returns the internal translation table used by htmlspecialchars and htmlentities
        !             7:  * Source code: ext/standard/html.c
        !             8: */
        !             9: 
        !            10: echo "*** Testing get_html_translation_table() : error conditions ***\n";
        !            11: 
        !            12: // More than expected number of arguments
        !            13: echo "\n-- Testing get_html_translation_table() function with more than expected no. of arguments --\n";
        !            14: $table = HTML_ENTITIES;
        !            15: $quote_style = ENT_COMPAT;
        !            16: $extra_arg = 10;
        !            17: 
        !            18: var_dump( get_html_translation_table($table, $quote_style, "UTF-8", $extra_arg) );
        !            19: 
        !            20: echo "Done\n";
        !            21: ?>
        !            22: --EXPECTF--
        !            23: *** Testing get_html_translation_table() : error conditions ***
        !            24: 
        !            25: -- Testing get_html_translation_table() function with more than expected no. of arguments --
        !            26: 
        !            27: Warning: get_html_translation_table() expects at most 3 parameters, 4 given in %s on line %d
        !            28: NULL
        !            29: Done

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