Skip to content

Commit 9a8de22

Browse files
AC-15635: PHPUnit 12 Upgrade | Fix Static Failure
1 parent a6ad50f commit 9a8de22

File tree

39 files changed

+54
-107
lines changed

39 files changed

+54
-107
lines changed

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/TierPriceTest.php

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,7 @@ public function testInitInternalCalls()
7575
{
7676
$searchCriteria = $this->createMock(SearchCriteria::class);
7777
$this->searchCriteriaBuilder->method('create')->willReturn($searchCriteria);
78-
$groupSearchResult = $this->createMock(
79-
GroupSearchResultsInterface::class,
80-
[],
81-
'',
82-
false
83-
);
78+
$groupSearchResult = $this->createMock(GroupSearchResultsInterface::class);
8479
$this->groupRepository
8580
->method('getList')
8681
->with($searchCriteria)
@@ -99,12 +94,7 @@ public function testInitAddToCustomerGroups()
9994
{
10095
$searchCriteria = $this->createMock(SearchCriteria::class);
10196
$this->searchCriteriaBuilder->method('create')->willReturn($searchCriteria);
102-
$groupSearchResult = $this->createMock(
103-
GroupSearchResultsInterface::class,
104-
[],
105-
'',
106-
false
107-
);
97+
$groupSearchResult = $this->createMock(GroupSearchResultsInterface::class);
10898
$this->groupRepository
10999
->method('getList')
110100
->with($searchCriteria)
@@ -166,12 +156,7 @@ public function testIsValidAddMessagesCall($value, $hasEmptyColumns, $customerGr
166156

167157
$searchCriteria = $this->createMock(SearchCriteria::class);
168158
$this->searchCriteriaBuilder->method('create')->willReturn($searchCriteria);
169-
$groupSearchResult = $this->createMock(
170-
GroupSearchResultsInterface::class,
171-
[],
172-
'',
173-
false
174-
);
159+
$groupSearchResult = $this->createMock(GroupSearchResultsInterface::class);
175160
$this->groupRepository
176161
->method('getList')
177162
->with($searchCriteria)

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/ValidatorTest.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,7 @@ class ValidatorTest extends TestCase
3232

3333
protected function setUp(): void
3434
{
35-
$this->validatorTest = $this->createMock(
36-
RowValidatorInterface::class,
37-
[],
38-
'',
39-
false
40-
);
35+
$this->validatorTest = $this->createMock(RowValidatorInterface::class);
4136
$messages = ['messages'];
4237
$this->validatorTest->method('getMessages')->willReturn($messages);
4338
$this->validators = [$this->validatorTest];

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricingTest.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,7 @@ protected function setUp(): void
162162
$this->importExportData = $this->createMock(ImportExportHelperData::class);
163163
$this->resourceHelper = $this->createMock(Helper::class);
164164
$this->resource = $this->createPartialMock(ResourceConnection::class, ['getConnection']);
165-
$this->connection = $this->createMock(
166-
AdapterInterface::class,
167-
[],
168-
'',
169-
false
170-
);
165+
$this->connection = $this->createMock(AdapterInterface::class);
171166
$this->resource->method('getConnection')->willReturn($this->connection);
172167
$this->dataSourceModel = $this->createMock(ResourceImportData::class);
173168
$entityType = $this->createMock(Type::class);

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Indexer/Product/Price/Plugin/ImportTest.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,7 @@ class ImportTest extends TestCase
3939

4040
protected function setUp(): void
4141
{
42-
$this->indexer = $this->createMock(
43-
IndexerInterface::class,
44-
[],
45-
'',
46-
false
47-
);
42+
$this->indexer = $this->createMock(IndexerInterface::class);
4843
$this->indexerRegistry = $this->createMock(
4944
IndexerRegistry::class
5045
);

app/code/Magento/AdvancedSearch/Test/Unit/Model/Indexer/Fulltext/Plugin/CustomerGroupTest.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,7 @@ protected function setUp(): void
5555
$this->customerOptionsMock = $this->createMock(
5656
ClientOptionsInterface::class
5757
);
58-
$this->indexerMock = $this->createMock(
59-
IndexerInterface::class,
60-
[],
61-
'',
62-
false,
63-
false,
64-
true,
65-
['getId', 'getState', '__wakeup']
66-
);
58+
$this->indexerMock = $this->createMock(IndexerInterface::class);
6759
$this->indexerRegistryMock = $this->createPartialMock(
6860
IndexerRegistry::class,
6961
['get']

app/code/Magento/Catalog/Test/Unit/Helper/AbstractCollectionTestHelper.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,3 @@ protected function _construct(): void
4949
// Mock implementation
5050
}
5151
}
52-

app/code/Magento/Catalog/Test/Unit/Helper/AttributeResourceModelTestHelper.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,3 @@ protected function _construct(): void
4949
// Mock implementation
5050
}
5151
}
52-

app/code/Magento/Catalog/Test/Unit/Helper/CategoryInterfaceTestHelper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
/**
1414
* Mock class for CategoryInterface with additional methods
15-
*
15+
*
1616
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
1717
*/
1818
class CategoryInterfaceTestHelper implements CategoryInterface, CustomAttributesDataInterface
@@ -31,7 +31,7 @@ class CategoryInterfaceTestHelper implements CategoryInterface, CustomAttributes
3131
* Mock method for getResource
3232
*
3333
* @return mixed
34-
*/
34+
*/
3535
public function getResource()
3636
{
3737
return $this->resource;
@@ -53,7 +53,7 @@ public function setResource($resource)
5353
* Mock method for getIsAnchor
5454
*
5555
* @return mixed
56-
*/
56+
*/
5757
public function getIsAnchor()
5858
{
5959
return $this->isAnchor;

app/code/Magento/Catalog/Test/Unit/Helper/FilterItemTestHelper.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,3 @@ protected function _construct(): void
8787
// Mock implementation
8888
}
8989
}
90-

app/code/Magento/Catalog/Test/Unit/Helper/PriceDataProviderTestHelper.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,3 @@ protected function _construct(): void
6565
// Mock implementation
6666
}
6767
}
68-

0 commit comments

Comments
 (0)