1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Merge pull request #2107 from VSEphpbb/ticket/12117

[ticket/12117] Add get_all_tree_data method to tree class
This commit is contained in:
Nathan Guse
2014-03-10 21:30:39 -05:00
2 changed files with 42 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)));
}
}