function test_loftHierarchy()
 {
     $nodes = array("1" => array("slug" => "aaa", "parent" => 0), "2" => array("slug" => "bbb", "parent" => 0), "3" => array("slug" => "ccc", "parent" => 0), "4" => array("slug" => "ddd", "parent" => 0), "5" => array("slug" => "eee", "parent" => 2), "6" => array("slug" => "fff", "parent" => 2), "7" => array("slug" => "ggg", "parent" => 2), "8" => array("slug" => "hhh", "parent" => 3), "9" => array("slug" => "iii", "parent" => 3), "10" => array("slug" => "jjj", "parent" => 3), "11" => array("slug" => "hhh", "parent" => 4), "12" => array("slug" => "iii", "parent" => 4), "13" => array("slug" => "jjj", "parent" => 4), "14" => array("slug" => "aaa", "parent" => 5), "15" => array("slug" => "bbb", "parent" => 5), "16" => array("slug" => "ccc", "parent" => 5), "17" => array("slug" => "xxx", "parent" => 15), "18" => array("slug" => "yyy", "parent" => 16), "19" => array("slug" => "zzz", "parent" => 16));
     $check = array("children" => array("1" => array("slug" => "aaa", "parent" => 0, "node_id" => 1), "2" => array("slug" => "bbb", "parent" => 0, "node_id" => 2, "children" => array("5" => array("slug" => "eee", "parent" => 2, "node_id" => 5, "children" => array("14" => array("slug" => "aaa", "parent" => 5, "node_id" => 14), "15" => array("slug" => "bbb", "parent" => 5, "node_id" => 15, "children" => array("17" => array("slug" => "xxx", "parent" => 15, "node_id" => 17))), "16" => array("slug" => "ccc", "parent" => 5, "node_id" => 16, "children" => array("18" => array("slug" => "yyy", "parent" => 16, "node_id" => 18), "19" => array("slug" => "zzz", "parent" => 16, "node_id" => 19))))), "6" => array("slug" => "fff", "parent" => 2, "node_id" => 6), "7" => array("slug" => "ggg", "parent" => 2, "node_id" => 7))), "3" => array("slug" => "ccc", "parent" => 0, "node_id" => 3, "children" => array("8" => array("slug" => "hhh", "parent" => 3, "node_id" => 8), "9" => array("slug" => "iii", "parent" => 3, "node_id" => 9), "10" => array("slug" => "jjj", "parent" => 3, "node_id" => 10))), "4" => array("slug" => "ddd", "parent" => 0, "node_id" => 4, "children" => array("11" => array("slug" => "hhh", "parent" => 4, "node_id" => 11), "12" => array("slug" => "iii", "parent" => 4, "node_id" => 12), "13" => array("slug" => "jjj", "parent" => 4, "node_id" => 13)))));
     $result = FOX_sUtil::loftHierarchy($nodes);
     $this->assertEquals($check, $result, FOX_debug::formatError_print($error));
     unset($error);
 }