1--TEST--
2Test function proc_nice() by substituting argument 1 with array values.
3--CREDITS--
4Italian PHP TestFest 2009 Cesena 19-20-21 june
5Fabio Fabbrucci (fabbrucci@grupporetina.com)
6Michele Orselli (mo@ideato.it)
7Simone Gentili (sensorario@gmail.com)
8--SKIPIF--
9<?php
10if(!function_exists('proc_nice')) die("skip. proc_nice not available ");
11?>
12--FILE--
13<?php
14
15
16echo "*** 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
31foreach ( $variation_array as $var ) {
32  var_dump(proc_nice( $var  ) );
33}
34?>
35--EXPECTF--
36*** Test substituting argument 1 with array values ***
37
38Warning: proc_nice() expects parameter 1 to be long, array given in %s on line %d
39bool(false)
40
41Warning: proc_nice() expects parameter 1 to be long, array given in %s on line %d
42bool(false)
43
44Warning: proc_nice() expects parameter 1 to be long, array given in %s on line %d
45bool(false)
46
47Warning: proc_nice() expects parameter 1 to be long, array given in %s on line %d
48bool(false)
49