OSDN Git Service

array_shrink_leaves()
[pukiwiki/pukiwiki_sandbox.git] / spam / SpamTest.php
index ec3b4e7..c45d74d 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-// $Id: SpamTest.php,v 1.9 2007/05/05 04:59:31 henoheno Exp $
+// $Id: SpamTest.php,v 1.10 2007/05/05 08:49:10 henoheno Exp $
 // Copyright (C) 2007 heno
 //
 // Design test case for spam.php (called from runner.php)
@@ -181,6 +181,17 @@ class SpamTest extends PHPUnit_TestCase
                $this->assertEquals($result, array_merge_leaves($array1, $array2));
        }
 
+       function testFunc_array_shrink_leaves()
+       {
+               $array  = array('key' => array('key'));
+               $result = array('key');
+               $this->assertEquals($result, array_shrink_leaves($array));
+
+               $array  = array('key' => array('key' => array('key' => array('key'))));
+               $result = array('key');
+               $this->assertEquals($result, array_shrink_leaves($array));
+       }
+
        function testFunc_uri_pickup()
        {
                // 1st argument: Null