From 38101a756a7f32d97eb042048c05a002f2df7bbe Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Fri, 22 Jun 2018 13:41:44 -0500 Subject: [PATCH] TreeModelTest: Tried varying a primary key value --- .gitignore | 1 + composer.json | 2 +- e107 | 2 +- tests/unit/TreeModelTest.php | 24 ++++++++++++------------ 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 87c27d97b..f6cfde8cc 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /config.local.yml /tests/_output/* /tests/_support/_generated/* +composer.phar composer.lock /vendor/**/* diff --git a/composer.json b/composer.json index 688322d96..e51b7a367 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "require-dev": { - "codeception/codeception": "^2.3", + "codeception/codeception": "^2.4", "twig/twig": ">=1.28" } } diff --git a/e107 b/e107 index 1494c1866..41f8e7848 160000 --- a/e107 +++ b/e107 @@ -1 +1 @@ -Subproject commit 1494c186603cf28d3f260c3e17b666aec75da390 +Subproject commit 41f8e784890f274382931b3ce664242dc965b2b4 diff --git a/tests/unit/TreeModelTest.php b/tests/unit/TreeModelTest.php index b7b5aafcc..1fce4cf4b 100644 --- a/tests/unit/TreeModelTest.php +++ b/tests/unit/TreeModelTest.php @@ -52,11 +52,11 @@ class TreeModelTest extends \Codeception\Test\Unit { $key = $this->sample_key; $parent_key = $this->sample_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]; + $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]; $this->assertEquals($l0_id, $l1_parent); $this->assertEquals($l1_id, $l2_parent); @@ -203,7 +203,7 @@ class TreeModelTest extends \Codeception\Test\Unit ), 1 => array ( - 'link_id' => '9', + 'link_id' => '99', 'link_name' => 'Nodes', 'link_url' => '', 'link_description' => '', @@ -386,7 +386,7 @@ class TreeModelTest extends \Codeception\Test\Unit 'link_button' => 'deltik_x10-favicon.png', 'link_category' => '1', 'link_order' => '3', - 'link_parent' => '9', + 'link_parent' => '99', 'link_open' => '0', 'link_class' => '255', 'link_function' => '', @@ -402,7 +402,7 @@ class TreeModelTest extends \Codeception\Test\Unit 'link_button' => 'deltik_docs-favicon.png', 'link_category' => '1', 'link_order' => '4', - 'link_parent' => '9', + 'link_parent' => '99', 'link_open' => '0', 'link_class' => '255', 'link_function' => '', @@ -418,7 +418,7 @@ class TreeModelTest extends \Codeception\Test\Unit 'link_button' => 'deltik_products-favicon.png', 'link_category' => '1', 'link_order' => '5', - 'link_parent' => '9', + 'link_parent' => '99', 'link_open' => '0', 'link_class' => '0', 'link_function' => '', @@ -434,7 +434,7 @@ class TreeModelTest extends \Codeception\Test\Unit 'link_button' => 'deltik_my-favicon.png', 'link_category' => '1', 'link_order' => '2', - 'link_parent' => '9', + 'link_parent' => '99', 'link_open' => '0', 'link_class' => '255', 'link_function' => '', @@ -450,7 +450,7 @@ class TreeModelTest extends \Codeception\Test\Unit 'link_button' => 'deltik_mc-favicon.png', 'link_category' => '1', 'link_order' => '6', - 'link_parent' => '9', + 'link_parent' => '99', 'link_open' => '0', 'link_class' => '0', 'link_function' => '', @@ -466,7 +466,7 @@ class TreeModelTest extends \Codeception\Test\Unit 'link_button' => 'deltik-favicon.png', 'link_category' => '1', 'link_order' => '1', - 'link_parent' => '9', + 'link_parent' => '99', 'link_open' => '0', 'link_class' => '0', 'link_function' => '',