1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[ticket/12117] Add get_all_tree_data method to tree class

PHPBB3-12117
This commit is contained in:
Matt Friedman
2014-03-10 15:59:45 -07:00
parent c169583dc3
commit c1115d9451
2 changed files with 44 additions and 0 deletions

View File

@@ -116,4 +116,20 @@ class phpbb_tests_tree_nestedset_forum_get_data_test extends phpbb_tests_tree_ne
$forum_data['forum_parents'] = $forum_parents;
$this->assertEquals($expected, array_keys($this->set->get_path_basic_data($forum_data)));
}
public function get_all_tree_data_data()
{
return array(
array(true, array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)),
array(false, array(11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)),
);
}
/**
* @dataProvider get_all_tree_data_data
*/
public function test_get_all_tree_data($order_asc, $expected)
{
$this->assertEquals($expected, array_keys($this->set->get_all_tree_data($order_asc)));
}
}