Skip to content

Commit a284ec1

Browse files
committed
AC-15048::[CE] PHPUnit 12: Upgrade Search & Navigation related test cases | Static Test Fixes
1 parent 04aba87 commit a284ec1

File tree

34 files changed

+63
-54
lines changed

34 files changed

+63
-54
lines changed

app/code/Magento/Elasticsearch/Test/Unit/ElasticAdapter/Model/Adapter/FieldMapper/Product/FieldProvider/FieldIndex/IndexResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright 2025 Adobe
3+
* Copyright 2023 Adobe
44
* All Rights Reserved.
55
*/
66
declare(strict_types=1);

app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/BatchDataMapper/DataMapperFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright 2025 Adobe
3+
* Copyright 2018 Adobe
44
* All Rights Reserved.
55
*/
66
declare(strict_types=1);

app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Magento\AdvancedSearch\Model\Client\ClientOptionsInterface;
1515
use Magento\Catalog\Api\ProductAttributeRepositoryInterface;
1616
use Magento\Eav\Model\Entity\Attribute\AbstractAttribute;
17-
use Magento\Elasticsearch\Model\Client\Elasticsearch;
1817
use Magento\Elasticsearch\Model\Adapter\BatchDataMapperInterface;
1918
use Magento\Elasticsearch\Model\Adapter\Elasticsearch as ElasticsearchAdapter;
2019
use Magento\Elasticsearch\Model\Adapter\FieldMapperInterface;
@@ -154,7 +153,7 @@ protected function setUp(): void
154153
$elasticsearchClientMock->expects($this->any())
155154
->method('indices')
156155
->willReturn($indicesMock);
157-
$this->client = $this->createMock(Elasticsearch::class); // @phpstan-ignore-line
156+
$this->client = $this->createMock(ElasticsearchClient::class);
158157
$this->connectionManager->expects($this->any())
159158
->method('getConnection')
160159
->willReturn($this->client);

app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/FieldMapper/Product/FieldProvider/StaticFieldTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ protected function setUp(): void
130130
* @param string $sortFieldName
131131
* @param array $expected
132132
* @return void
133+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
134+
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
133135
*/
134136
#[DataProvider('attributeProvider')]
135137
public function testGetAllAttributesTypes(

app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/Index/Config/EsConfigTest.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,20 @@ protected function setUp(): void
7777
}
7878

7979
/**
80-
* @return array|mixed|null
80+
* Test getStemmerInfo method
8181
*/
82-
public function testGetStemmerInfo()
82+
public function testGetStemmerInfo(): void
8383
{
84-
$this->config->getStemmerInfo();
84+
$result = $this->config->getStemmerInfo();
85+
$this->assertIsArray($result);
8586
}
8687

8788
/**
88-
* @return array|mixed|null
89+
* Test getStopwordsInfo method
8990
*/
90-
public function testGetStopwordsInfo()
91+
public function testGetStopwordsInfo(): void
9192
{
92-
$this->config->getStopwordsInfo();
93+
$result = $this->config->getStopwordsInfo();
94+
$this->assertIsArray($result);
9395
}
9496
}

app/code/Magento/Elasticsearch/Test/Unit/SearchAdapter/DocumentFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class DocumentFactoryTest extends TestCase
3939
protected $entityMetadata;
4040

4141
/**
42-
* Instance name
42+
* Fully qualified class name of the entity
4343
*
4444
* @var string
4545
*/

app/code/Magento/LayeredNavigation/Test/Unit/Block/NavigationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright 2018 Adobe
3+
* Copyright 2015 Adobe
44
* All Rights Reserved.
55
*/
66
declare(strict_types=1);

app/code/Magento/LayeredNavigation/Test/Unit/Observer/Edit/Tab/Front/ProductAttributeFormBuildFormFieldDependenciesObserverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright 2025 Adobe
3+
* Copyright 2023 Adobe
44
* All Rights Reserved.
55
*/
66

app/code/Magento/LayeredNavigation/Test/Unit/Observer/Edit/Tab/Front/ProductAttributeFormBuildFrontTabObserverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright 2025 Adobe
3+
* Copyright 2020 Adobe
44
* All Rights Reserved.
55
*/
66

app/code/Magento/LayeredNavigation/Test/Unit/Observer/Grid/ProductAttributeGridBuildObserverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright 2025 Adobe
3+
* Copyright 2019 Adobe
44
* All Rights Reserved.
55
*/
66
declare(strict_types=1);

0 commit comments

Comments
 (0)