Skip to content

Commit 7fa3f68

Browse files
committed
ENGCOM-3252: Static test fix.
1 parent 3c1f5f1 commit 7fa3f68

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

app/code/Magento/Catalog/Model/Category/Tree.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@ public function __construct(
6060
}
6161

6262
/**
63+
* Get root node by category.
64+
*
6365
* @param \Magento\Catalog\Model\Category|null $category
6466
* @return Node|null
67+
* @throws \Magento\Framework\Exception\LocalizedException
68+
* @throws \Magento\Framework\Exception\NoSuchEntityException
6569
*/
6670
public function getRootNode($category = null)
6771
{
@@ -80,8 +84,12 @@ public function getRootNode($category = null)
8084
}
8185

8286
/**
87+
* Get node by category.
88+
*
8389
* @param \Magento\Catalog\Model\Category $category
8490
* @return Node
91+
* @throws \Magento\Framework\Exception\LocalizedException
92+
* @throws \Magento\Framework\Exception\NoSuchEntityException
8593
*/
8694
protected function getNode(\Magento\Catalog\Model\Category $category)
8795
{
@@ -95,7 +103,11 @@ protected function getNode(\Magento\Catalog\Model\Category $category)
95103
}
96104

97105
/**
106+
* Prepare category collection.
107+
*
98108
* @return void
109+
* @throws \Magento\Framework\Exception\LocalizedException
110+
* @throws \Magento\Framework\Exception\NoSuchEntityException
99111
*/
100112
protected function prepareCollection()
101113
{
@@ -114,6 +126,8 @@ protected function prepareCollection()
114126
}
115127

116128
/**
129+
* Get tree by node.
130+
*
117131
* @param \Magento\Framework\Data\Tree\Node $node
118132
* @param int $depth
119133
* @param int $currentLevel
@@ -137,6 +151,8 @@ public function getTree($node, $depth = null, $currentLevel = 0)
137151
}
138152

139153
/**
154+
* Get node children.
155+
*
140156
* @param \Magento\Framework\Data\Tree\Node $node
141157
* @param int $depth
142158
* @param int $currentLevel

app/code/Magento/Catalog/Test/Unit/Model/Category/TreeTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ protected function setUp()
6464
\Magento\Store\Model\StoreManagerInterface::class
6565
)->disableOriginalConstructor()->getMock();
6666

67-
$this->treeResourceFactoryMock = $this->createMock(\Magento\Catalog\Model\ResourceModel\Category\TreeFactory::class);
67+
$this->treeResourceFactoryMock = $this->createMock(
68+
\Magento\Catalog\Model\ResourceModel\Category\TreeFactory::class
69+
);
6870
$this->treeResourceFactoryMock->method('create')
6971
->willReturn($this->categoryTreeMock);
7072

0 commit comments

Comments
 (0)