Skip to content

Commit c4a686e

Browse files
committed
Fix static test failure
1 parent 57eb90d commit c4a686e

File tree

1 file changed

+4
-20
lines changed
  • app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Category/Checkboxes

1 file changed

+4
-20
lines changed

app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Category/Checkboxes/TreeTest.php

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ protected function setUp(): void
4343
private function createCategoryCollectionStub(array $paths)
4444
{
4545
// Simple iterable stub with chainable methods
46-
/**
47-
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
48-
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
49-
*/
5046
return new class($paths) implements \IteratorAggregate, \Countable {
5147
/** @var array */
5248
private $items;
@@ -75,13 +71,9 @@ public function addAttributeToSelect($arg)
7571
{
7672
return $this;
7773
}
78-
/**
79-
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
80-
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
81-
*/
82-
public function addAttributeToFilter($field, $cond)
74+
public function addAttributeToFilter(...$args)
8375
{
84-
$this->lastFilter = [$field, $cond];
76+
$this->lastFilter = $args;
8577
return $this;
8678
}
8779
public function getIterator(): \Traversable
@@ -184,10 +176,6 @@ public function testSetCategoryIdsWithScalarCastsToIntArrayAndFiltersCollection(
184176
$block = $this->buildBlockMock();
185177

186178
// Custom stub that captures the last filter applied
187-
/**
188-
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
189-
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
190-
*/
191179
$collectionStub = new class() implements \IteratorAggregate, \Countable {
192180
/** @var array */
193181
private $items = [];
@@ -197,13 +185,9 @@ public function addAttributeToSelect($arg)
197185
{
198186
return $this;
199187
}
200-
/**
201-
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
202-
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
203-
*/
204-
public function addAttributeToFilter($field, $cond)
188+
public function addAttributeToFilter(...$args)
205189
{
206-
$this->lastFilter = [$field, $cond];
190+
$this->lastFilter = $args;
207191
return $this;
208192
}
209193
public function getIterator(): \Traversable

0 commit comments

Comments
 (0)