]> granicus.if.org Git - php/commitdiff
Move the test to new file.
authorAndrey Hristov <andrey@php.net>
Tue, 30 Sep 2003 15:22:33 +0000 (15:22 +0000)
committerAndrey Hristov <andrey@php.net>
Tue, 30 Sep 2003 15:22:33 +0000 (15:22 +0000)
ext/standard/tests/array/007.phpt
ext/standard/tests/array/array_diff_1.phpt [new file with mode: 0644]

index 02aa084218a0abee47faedae2d81e8f453d07368..753aced821a9cd11d1a00e2846e7bdffa9ec9593 100644 (file)
@@ -2,12 +2,6 @@
 Test array_diff and array_diff_assoc behaviour
 --FILE--
 <?php
-//-=-=-=-=-
-$a = array();
-$b = 3;
-$c = array(5);
-array_diff($a, $b, $c);
-//-=-=-=-=-=-
 $a = array(1,"big"=>2,3,6,3,5,3,3,3,3,3,3,3,3,3,3);
 $b = array(2,2,3,3,3,3,3,3,3,3,3,3,3,3,3);
 $c = array(-1,1);
@@ -133,7 +127,6 @@ var_dump(array_udiff_assoc($a, $b, "comp_func_cr"));
 
 ?>
 --EXPECTF--
-Warning: array_diff(): Argument #2 is not an array in %s
 $a=array (
   0 => 1,
   'big' => 2,
diff --git a/ext/standard/tests/array/array_diff_1.phpt b/ext/standard/tests/array/array_diff_1.phpt
new file mode 100644 (file)
index 0000000..a25d19d
--- /dev/null
@@ -0,0 +1,15 @@
+--TEST--
+Test array_diff when non-array is passed
+--FILE--
+<?php
+//-=-=-=-=-
+$a = array();
+$b = 3;
+$c = array(5);
+array_diff($a, $b, $c);
+//-=-=-=-=-=-
+echo "OK!";
+?>
+--EXPECTF--
+Warning: array_diff(): Argument #2 is not an array in %s
+OK!