mirror of
https://github.com/e107inc/e107.git
synced 2025-08-26 15:54:43 +02:00
Strict fixes for e_tree_model::flattenTree()
- FIX: Null check during child recursion of e_tree_model::flattenTree() - FIX: TreeModelTest::testTreeParentsAreAssignedCorrectly() apparently never worked until now because the wrong index was used
This commit is contained in:
@@ -52,11 +52,11 @@ class TreeModelTest extends \Codeception\Test\Unit
|
||||
{
|
||||
$key = $this->sample_key;
|
||||
$parent_key = $this->sample_parent_key;
|
||||
$l0_id = $this->tree[1][$key];
|
||||
$l1_id = $this->tree[1]['_children'][0][$key];
|
||||
$l1_parent = $this->tree[1]['_children'][0][$parent_key];
|
||||
$l2_id = $this->tree[1]['_children'][0]['_children'][0][$key];
|
||||
$l2_parent = $this->tree[1]['_children'][0]['_children'][0][$parent_key];
|
||||
$l0_id = $this->tree[0][$key];
|
||||
$l1_id = $this->tree[0]['_children'][0][$key];
|
||||
$l1_parent = $this->tree[0]['_children'][0][$parent_key];
|
||||
$l2_id = $this->tree[0]['_children'][0]['_children'][0][$key];
|
||||
$l2_parent = $this->tree[0]['_children'][0]['_children'][0][$parent_key];
|
||||
|
||||
$this->assertEquals($l0_id, $l1_parent);
|
||||
$this->assertEquals($l1_id, $l2_parent);
|
||||
|
Reference in New Issue
Block a user