Annotation of embedaddon/php/ext/posix/tests/posix_setuid_variation6.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test function posix_setuid() by substituting argument 1 with string values.
        !             3: --SKIPIF--
        !             4: <?php 
        !             5:         if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; 
        !             6: ?>
        !             7: --CREDITS--
        !             8: Marco Fabbri mrfabbri@gmail.com
        !             9: Francesco Fullone ff@ideato.it
        !            10: #PHPTestFest Cesena Italia on 2009-06-20
        !            11: --FILE--
        !            12: <?php
        !            13: 
        !            14: 
        !            15: echo "*** Test substituting argument 1 with string values ***\n";
        !            16: 
        !            17: 
        !            18: 
        !            19: $heredoc = <<<EOT
        !            20: hello world
        !            21: EOT;
        !            22: 
        !            23: $variation_array = array(
        !            24:   'string DQ' => "string",
        !            25:   'string SQ' => 'string',
        !            26:   'mixed case string' => "sTrInG",
        !            27:   'heredoc' => $heredoc,
        !            28:   );
        !            29: 
        !            30: 
        !            31: foreach ( $variation_array as $var ) {
        !            32:   var_dump(posix_setuid( $var  ) );
        !            33: }
        !            34: ?>
        !            35: --EXPECTF--
        !            36: *** Test substituting argument 1 with string values ***
        !            37: 
        !            38: Warning: posix_setuid() expects parameter 1 to be long, string given in %s on line 21
        !            39: bool(false)
        !            40: 
        !            41: Warning: posix_setuid() expects parameter 1 to be long, string given in %s on line 21
        !            42: bool(false)
        !            43: 
        !            44: Warning: posix_setuid() expects parameter 1 to be long, string given in %s on line 21
        !            45: bool(false)
        !            46: 
        !            47: Warning: posix_setuid() expects parameter 1 to be long, string given in %s on line 21
        !            48: bool(false)

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