aboutsummaryrefslogtreecommitdiffstats
path: root/tests/tree/nestedset_forum_base.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-04-30 18:05:44 +0200
committerJoas Schilling <nickvergessen@gmx.de>2013-04-30 18:05:44 +0200
commit39ff3ed15fc77215153a47a870e8cde5436674ae (patch)
tree32d8cdec813255b68c7ff27c3daecd18f0c14006 /tests/tree/nestedset_forum_base.php
parentf3f7be4cd1a0495cf44787c713480d5aceb1bae1 (diff)
downloadforums-39ff3ed15fc77215153a47a870e8cde5436674ae.tar
forums-39ff3ed15fc77215153a47a870e8cde5436674ae.tar.gz
forums-39ff3ed15fc77215153a47a870e8cde5436674ae.tar.bz2
forums-39ff3ed15fc77215153a47a870e8cde5436674ae.tar.xz
forums-39ff3ed15fc77215153a47a870e8cde5436674ae.zip
[ticket/11495] Add proper testing of item_parent to tests
PHPBB3-11495
Diffstat (limited to 'tests/tree/nestedset_forum_base.php')
-rw-r--r--tests/tree/nestedset_forum_base.php30
1 files changed, 17 insertions, 13 deletions
diff --git a/tests/tree/nestedset_forum_base.php b/tests/tree/nestedset_forum_base.php
index 2b617fcc53..b9d42fb51d 100644
--- a/tests/tree/nestedset_forum_base.php
+++ b/tests/tree/nestedset_forum_base.php
@@ -16,27 +16,27 @@ class phpbb_tests_tree_nestedset_forum_base extends phpbb_database_test_case
protected $forum_data = array(
// \__/
- 1 => array('forum_id' => 1, 'parent_id' => 0, 'user_id' => 0, 'left_id' => 1, 'right_id' => 6, 'forum_parents' => ''),
- 2 => array('forum_id' => 2, 'parent_id' => 1, 'user_id' => 0, 'left_id' => 2, 'right_id' => 3, 'forum_parents' => ''),
- 3 => array('forum_id' => 3, 'parent_id' => 1, 'user_id' => 0, 'left_id' => 4, 'right_id' => 5, 'forum_parents' => ''),
+ 1 => array('forum_id' => 1, 'parent_id' => 0, 'user_id' => 0, 'left_id' => 1, 'right_id' => 6, 'forum_parents' => 'a:0:{}'),
+ 2 => array('forum_id' => 2, 'parent_id' => 1, 'user_id' => 0, 'left_id' => 2, 'right_id' => 3, 'forum_parents' => 'a:0:{}'),
+ 3 => array('forum_id' => 3, 'parent_id' => 1, 'user_id' => 0, 'left_id' => 4, 'right_id' => 5, 'forum_parents' => 'a:0:{}'),
// \ /
// \/
- 4 => array('forum_id' => 4, 'parent_id' => 0, 'user_id' => 0, 'left_id' => 7, 'right_id' => 12, 'forum_parents' => ''),
- 5 => array('forum_id' => 5, 'parent_id' => 4, 'user_id' => 0, 'left_id' => 8, 'right_id' => 11, 'forum_parents' => ''),
- 6 => array('forum_id' => 6, 'parent_id' => 5, 'user_id' => 0, 'left_id' => 9, 'right_id' => 10, 'forum_parents' => ''),
+ 4 => array('forum_id' => 4, 'parent_id' => 0, 'user_id' => 0, 'left_id' => 7, 'right_id' => 12, 'forum_parents' => 'a:0:{}'),
+ 5 => array('forum_id' => 5, 'parent_id' => 4, 'user_id' => 0, 'left_id' => 8, 'right_id' => 11, 'forum_parents' => 'a:0:{}'),
+ 6 => array('forum_id' => 6, 'parent_id' => 5, 'user_id' => 0, 'left_id' => 9, 'right_id' => 10, 'forum_parents' => 'a:0:{}'),
// \_ _/
// \/
- 7 => array('forum_id' => 7, 'parent_id' => 0, 'user_id' => 0, 'left_id' => 13, 'right_id' => 22, 'forum_parents' => ''),
- 8 => array('forum_id' => 8, 'parent_id' => 7, 'user_id' => 0, 'left_id' => 14, 'right_id' => 15, 'forum_parents' => ''),
- 9 => array('forum_id' => 9, 'parent_id' => 7, 'user_id' => 0, 'left_id' => 16, 'right_id' => 19, 'forum_parents' => ''),
- 10 => array('forum_id' => 10, 'parent_id' => 9, 'user_id' => 0, 'left_id' => 17, 'right_id' => 18, 'forum_parents' => ''),
- 11 => array('forum_id' => 11, 'parent_id' => 7, 'user_id' => 0, 'left_id' => 20, 'right_id' => 21, 'forum_parents' => ''),
+ 7 => array('forum_id' => 7, 'parent_id' => 0, 'user_id' => 0, 'left_id' => 13, 'right_id' => 22, 'forum_parents' => 'a:0:{}'),
+ 8 => array('forum_id' => 8, 'parent_id' => 7, 'user_id' => 0, 'left_id' => 14, 'right_id' => 15, 'forum_parents' => 'a:0:{}'),
+ 9 => array('forum_id' => 9, 'parent_id' => 7, 'user_id' => 0, 'left_id' => 16, 'right_id' => 19, 'forum_parents' => 'a:0:{}'),
+ 10 => array('forum_id' => 10, 'parent_id' => 9, 'user_id' => 0, 'left_id' => 17, 'right_id' => 18, 'forum_parents' => 'a:0:{}'),
+ 11 => array('forum_id' => 11, 'parent_id' => 7, 'user_id' => 0, 'left_id' => 20, 'right_id' => 21, 'forum_parents' => 'a:0:{}'),
// Unexisting forums
- 0 => array('forum_id' => 0, 'parent_id' => 0, 'user_id' => 0, 'left_id' => 0, 'right_id' => 0, 'forum_parents' => ''),
- 200 => array('forum_id' => 200, 'parent_id' => 0, 'user_id' => 0, 'left_id' => 0, 'right_id' => 0, 'forum_parents' => ''),
+ 0 => array('forum_id' => 0, 'parent_id' => 0, 'user_id' => 0, 'left_id' => 0, 'right_id' => 0, 'forum_parents' => 'a:0:{}'),
+ 200 => array('forum_id' => 200, 'parent_id' => 0, 'user_id' => 0, 'left_id' => 0, 'right_id' => 0, 'forum_parents' => 'a:0:{}'),
);
protected $set,
@@ -59,6 +59,10 @@ class phpbb_tests_tree_nestedset_forum_base extends phpbb_database_test_case
$this->set = new phpbb_tree_nestedset_forum($this->db, $this->lock, 'phpbb_forums');
$this->set_up_forums();
+
+ $sql = "UPDATE phpbb_forums
+ SET forum_parents = 'a:0:{}'";
+ $this->db->sql_query($sql);
}
protected function set_up_forums()