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

1.1       misho       1: --TEST--
                      2: Test function posix_ttyname() by substituting argument 1 with emptyUnsetUndefNull values.
                      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 substituting argument 1 with emptyUnsetUndefNull values ***\n";
                     18: 
                     19: 
                     20: 
                     21: $unset_var = 10;
                     22: unset($unset_var);
                     23: 
                     24: $variation_array = array(
                     25:   'unset var' => @$unset_var,
                     26:   'undefined var' => @$undefined_var,
                     27:   'empty string DQ' => "",
                     28:   'empty string SQ' => '',
                     29:   'uppercase NULL' => NULL,
                     30:   'lowercase null' => null,
                     31:   );
                     32: 
                     33: 
                     34: foreach ( $variation_array as $var ) {
                     35:   var_dump(posix_ttyname( $var  ) );
                     36: }
                     37: ?>
                     38: --EXPECTF--
                     39: *** Test substituting argument 1 with emptyUnsetUndefNull values ***
                     40: bool(false)
                     41: bool(false)
                     42: bool(false)
                     43: bool(false)
                     44: bool(false)
                     45: bool(false)

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