Annotation of embedaddon/php/ext/posix/tests/posix_ttyname_error.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test function posix_ttyname() by calling it more than or less than its expected arguments
                      3: --CREDITS--
                      4: Marco Fabbri mrfabbri@gmail.com
                      5: Francesco Fullone ff@ideato.it
                      6: #PHPTestFest Cesena Italia on 2009-06-20
                      7: --SKIPIF--
                      8: <?php
                      9: if (!extension_loaded('posix')) {
                     10:     die('SKIP The posix extension is not loaded.');
                     11: }
                     12: ?>
                     13: --FILE--
                     14: <?php
                     15: 
                     16: 
                     17: echo "*** Test by calling method or function with incorrect numbers of arguments ***\n";
                     18: 
                     19: $fd = 'foo';
                     20: $extra_arg = 'bar'; 
                     21: 
                     22: var_dump(posix_ttyname( $fd, $extra_arg ) );
                     23: 
                     24: var_dump(posix_ttyname(  ) );
                     25: 
                     26: 
                     27: ?>
                     28: --EXPECTF--
                     29: *** Test by calling method or function with incorrect numbers of arguments ***
                     30: 
                     31: Warning: posix_ttyname() expects exactly 1 parameter, 2 given in %s on line %d
                     32: bool(false)
                     33: 
                     34: Warning: posix_ttyname() expects exactly 1 parameter, 0 given in %s on line %d
                     35: bool(false)

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