Annotation of embedaddon/php/ext/exif/tests/exif_tagname_error.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test exif_tagname() function : error conditions 
                      3: --SKIPIF--
                      4: <?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
                      5: --FILE--
                      6: <?php
                      7: 
                      8: /* Prototype  :string exif_tagname ( string $index  )
                      9:  * Description: Get the header name for an index
                     10:  * Source code: ext/exif/exif.c
                     11: */
                     12: 
                     13: echo "*** Testing exif_tagname() : error conditions ***\n";
                     14: 
                     15: echo "\n-- Testing exif_tagname() function with no arguments --\n";
                     16: var_dump( exif_tagname() );
                     17: 
                     18: echo "\n-- Testing exif_tagname() function with more than expected no. of arguments --\n";
                     19: $extra_arg = 10;
                     20: var_dump( exif_tagname(0x10E, $extra_arg) );
                     21: 
                     22: ?>
                     23: ===Done===
                     24: --EXPECTF--
                     25: *** Testing exif_tagname() : error conditions ***
                     26: 
                     27: -- Testing exif_tagname() function with no arguments --
                     28: 
                     29: Warning: exif_tagname() expects exactly 1 parameter, 0 given in %s on line %d
                     30: NULL
                     31: 
                     32: -- Testing exif_tagname() function with more than expected no. of arguments --
                     33: 
                     34: Warning: exif_tagname() expects exactly 1 parameter, 2 given in %s on line %d
                     35: NULL
                     36: ===Done===
                     37: 

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