<?php
-// $Id: SpamTest.php,v 1.7 2007/05/04 14:42:28 henoheno Exp $
+// $Id: SpamTest.php,v 1.8 2007/05/04 14:54:21 henoheno Exp $
// Copyright (C) 2007 heno
//
// Design test case for spam.php (called from runner.php)
'f4',
);
$this->assertEquals($result, array_merge_leaves($array1, $array2));
+
+ // ----
+
+ // Values will not be unique now
+ $array1 = array(5, 4);
+ $array2 = array(4, 5);
+ $result = array(5, 4, 4, 5);
+ $this->assertEquals($result, array_merge_leaves($array1, $array2));
+
+ // One more thing ...
+ $array1 = array('b' => array('k3'));
+ $array2 = array('b' => 'k3');
+ $result = array('b' => array('k3', 'k3'));
+ $this->assertEquals($result, array_merge_leaves($array1, $array2));
}
function testFunc_uri_pickup()
<?php
-// $Id: spam.php,v 1.146 2007/05/04 14:44:06 henoheno Exp $
+// $Id: spam.php,v 1.147 2007/05/04 14:55:36 henoheno Exp $
// Copyright (C) 2006-2007 PukiWiki Developers Team
// License: GPL v2 or (at your option) any later version
//
if ($asap && $is_spam) break;
// Merge $blocked
+ // TODO: unique the hosts
$blocked = array_merge_leaves($blocked, $_progress['blocked']);
// Merge $hosts
+ // TODO: unique the hosts
$hosts = array_merge_leaves($hosts, $_progress['hosts']);
}