Skip to content

Commit 3344d49

Browse files
ShradddhaShradddha
authored andcommitted
AC-11979:: Remove Deprecations- PhpUnit10 Integration Tests
1 parent 4f230d1 commit 3344d49

File tree

8 files changed

+22
-15
lines changed

8 files changed

+22
-15
lines changed

app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/CacheOutdatedTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected function setUp(): void
6363
public function testGetIdentity($expectedSum, $types)
6464
{
6565
$cacheType = [];
66-
foreach($types as $type){
66+
foreach ($types as $type) {
6767
$cacheType[] = $type($this);
6868
}
6969

@@ -107,7 +107,7 @@ public static function getIdentityDataProvider()
107107
public function testIsDisplayed($expected, $allowed, $cacheTypes)
108108
{
109109
$cacheType1 = [];
110-
foreach($cacheTypes as $cacheType){
110+
foreach ($cacheTypes as $cacheType) {
111111
$cacheType1[] = $cacheType($this);
112112
}
113113
$this->_authorizationMock->expects($this->once())->method('isAllowed')->willReturn($allowed);

app/code/Magento/Analytics/Test/Unit/ReportXml/QueryFactoryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
*/
3131
class QueryFactoryTest extends TestCase
3232
{
33-
const STUB_QUERY_NAME = 'test_query';
34-
const STUB_CONNECTION = 'default';
33+
private const STUB_QUERY_NAME = 'test_query';
34+
private const STUB_CONNECTION = 'default';
3535

3636
/**
3737
* @var QueryFactory

app/code/Magento/CardinalCommerce/Test/Unit/Model/Response/JwtPayloadValidatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public function testValidationExpirationFails()
154154
*
155155
* @return array
156156
*/
157-
private static function createToken(string $eciFlag, string $errorNumber, string $actionCode, int $expTimestamp): array
157+
private static function createToken(string $eciFlag, string $errorNumber, string $actionCode, int $expTimestamp): array // @codingStandardsIgnoreLine
158158
{
159159
return [
160160
[

app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/Image/UploadTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
namespace Magento\Catalog\Test\Unit\Controller\Adminhtml\Category\Image;
99

10+
use Magento\CardinalCommerce\Model\Response\JwtPayloadValidator;
1011
use Magento\Catalog\Controller\Adminhtml\Category\Image\Upload as Model;
1112
use Magento\Catalog\Model\ImageUploader;
1213
use Magento\Framework\App\Request\Http as Request;
@@ -17,6 +18,9 @@
1718

1819
class UploadTest extends TestCase
1920
{
21+
/**
22+
* @var ObjectManager
23+
*/
2024
private $objectManager;
2125

2226
protected function setUp(): void

app/code/Magento/Catalog/Test/Unit/Helper/Product/ProductListTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
class ProductListTest extends TestCase
1717
{
18-
const STUB_VIEW_MODE = 'grid';
18+
private const STUB_VIEW_MODE = 'grid';
1919
/**
2020
* @var ScopeConfigInterface|MockObject
2121
*/

app/code/Magento/Catalog/Test/Unit/Model/Product/Type/PriceTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
*/
3030
class PriceTest extends TestCase
3131
{
32-
const KEY_TIER_PRICE = 'tier_price';
33-
const PRICE_SCOPE_GLOBAL = 0;
34-
const PRICE_SCOPE_WEBSITE = 1;
32+
private const KEY_TIER_PRICE = 'tier_price';
33+
private const PRICE_SCOPE_GLOBAL = 0;
34+
private const PRICE_SCOPE_WEBSITE = 1;
3535

3636
/**
3737
* @var \Magento\Catalog\Model\Product\Type\Price

app/code/Magento/Config/Test/Unit/Model/Config/Backend/SerializedTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ class SerializedTest extends TestCase
2828
/** @var LoggerInterface|MockObject */
2929
private $loggerMock;
3030

31+
/**
32+
* @var ScopeConfigInterface|MockObject
33+
**/
3134
private $scopeConfigMock;
3235

3336
protected function setUp(): void

app/code/Magento/Config/Test/Unit/Model/Config/Structure/Element/Dependency/FieldTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@ class FieldTest extends TestCase
1515
/**#@+
1616
* SUT values
1717
*/
18-
const SIMPLE_VALUE = 'someValue';
18+
private const SIMPLE_VALUE = 'someValue';
1919

20-
const EMPTY_VALUE = '';
20+
private const EMPTY_VALUE = '';
2121

22-
const COMPLEX_VALUE1 = 'value_1';
22+
private const COMPLEX_VALUE1 = 'value_1';
2323

24-
const COMPLEX_VALUE2 = 'value_2';
24+
private const COMPLEX_VALUE2 = 'value_2';
2525

26-
const COMPLEX_VALUE3 = 'value_3';
26+
private const COMPLEX_VALUE3 = 'value_3';
2727

2828
/**#@-*/
2929

3030
/**
3131
* Field prefix
3232
*/
33-
const PREFIX = 'prefix_';
33+
private const PREFIX = 'prefix_';
3434

3535
/**
3636
* Get simple data for creating SUT

0 commit comments

Comments
 (0)