File tree Expand file tree Collapse file tree 1 file changed +8
-27
lines changed
dev/tests/integration/testsuite/Magento/UrlRewrite/Block/Catalog/Category Expand file tree Collapse file tree 1 file changed +8
-27
lines changed Original file line number Diff line number Diff line change @@ -32,36 +32,17 @@ protected function setUp()
32
32
33
33
/**
34
34
* Test for method \Magento\UrlRewrite\Block\Catalog\Category\Tree::getTreeArray()
35
+ * @magentoAppIsolation enabled
36
+ * @magentoDataFixture Magento/Catalog/_files/indexer_catalog_category.php
35
37
*/
36
38
public function testGetTreeArray ()
37
39
{
38
- $ expectedTreeArray = [
39
- 'id ' => 1 ,
40
- 'parent_id ' => 0 ,
41
- 'children_count ' => 1 ,
42
- 'is_active ' => false ,
43
- 'name ' => 'Root ' ,
44
- 'level ' => 0 ,
45
- 'product_count ' => 0 ,
46
- 'children ' => [
47
- [
48
- 'id ' => 2 ,
49
- 'parent_id ' => \Magento \Catalog \Model \Category::TREE_ROOT_ID ,
50
- 'children_count ' => 0 ,
51
- 'is_active ' => true ,
52
- 'name ' => 'Default Category ' ,
53
- 'level ' => 1 ,
54
- 'product_count ' => 0 ,
55
- 'cls ' => 'active-category ' ,
56
- 'expanded ' => false ,
57
- 'disabled ' => true ,
58
- ],
59
- ],
60
- 'cls ' => 'no-active-category ' ,
61
- 'expanded ' => true ,
62
- ];
63
-
64
- $ this ->assertEquals ($ expectedTreeArray , $ this ->_treeBlock ->getTreeArray (), 'Tree array is invalid ' );
40
+ $ tree = $ this ->_treeBlock ->getTreeArray ();
41
+ $ this ->assertEquals (6 , $ tree ['children_count ' ]);
42
+ $ this ->assertEquals (false , $ tree ['is_active ' ]);
43
+ $ this ->assertEquals ('Root ' , (string )$ tree ['name ' ]);
44
+ $ this ->assertEquals (true , $ tree ['expanded ' ]);
45
+ $ this ->assertCount (1 , $ tree ['children ' ]);
65
46
}
66
47
67
48
/**
You can’t perform that action at this time.
0 commit comments