Annotation of embedaddon/php/ext/standard/tests/general_functions/proc_nice_variation1.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test function proc_nice() by substituting argument 1 with array values.
                      3: --CREDITS--
                      4: Italian PHP TestFest 2009 Cesena 19-20-21 june
                      5: Fabio Fabbrucci (fabbrucci@grupporetina.com)
                      6: Michele Orselli (mo@ideato.it)
                      7: Simone Gentili (sensorario@gmail.com)
                      8: --SKIPIF--
                      9: <?php
                     10: if(!function_exists('proc_nice')) die("skip. proc_nice not available ");
                     11: ?>
                     12: --FILE--
                     13: <?php
                     14: 
                     15: 
                     16: echo "*** Test substituting argument 1 with array values ***\n";
                     17: 
                     18: 
                     19: 
                     20: $index_array = array(1, 2, 3);
                     21: $assoc_array = array(1 => 'one', 2 => 'two');
                     22: 
                     23: $variation_array = array(
                     24:   'empty array' => array(),
                     25:   'int indexed array' => $index_array,
                     26:   'associative array' => $assoc_array,
                     27:   'nested arrays' => array('foo', $index_array, $assoc_array),
                     28:   );
                     29: 
                     30: 
                     31: foreach ( $variation_array as $var ) {
                     32:   var_dump(proc_nice( $var  ) );
                     33: }
                     34: ?>
                     35: --EXPECTF--
                     36: *** Test substituting argument 1 with array values ***
                     37: 
                     38: Warning: proc_nice() expects parameter 1 to be long, array given in %s on line %d
                     39: bool(false)
                     40: 
                     41: Warning: proc_nice() expects parameter 1 to be long, array given in %s on line %d
                     42: bool(false)
                     43: 
                     44: Warning: proc_nice() expects parameter 1 to be long, array given in %s on line %d
                     45: bool(false)
                     46: 
                     47: Warning: proc_nice() expects parameter 1 to be long, array given in %s on line %d
                     48: bool(false)

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