Skip to content

Commit bc9004d

Browse files
committed
AC-10634: Static Test Fixes
1 parent 3f24986 commit bc9004d

File tree

9 files changed

+13
-12
lines changed

9 files changed

+13
-12
lines changed

app/code/Magento/Authorization/Test/Unit/Model/ResourceModel/RulesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class RulesTest extends TestCase
3535
/**
3636
* Test constants
3737
*/
38-
const TEST_ROLE_ID = 13;
38+
private const TEST_ROLE_ID = 13;
3939

4040
/**
4141
* @var Rules

app/code/Magento/Backend/Test/Unit/Controller/Adminhtml/Auth/LoginTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030

3131
/**
3232
* Test for \Magento\Backend\Controller\Adminhtml\Auth\Login.
33+
*
34+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
3335
*/
3436
class LoginTest extends TestCase
3537
{

app/code/Magento/Bundle/Test/Unit/Controller/Adminhtml/Product/Initialization/Helper/Plugin/BundleTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<?php
2-
declare(strict_types=1);
32
/**
4-
* Test class for \Magento\Bundle\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Bundle
5-
*
63
* Copyright © Magento, Inc. All rights reserved.
74
* See COPYING.txt for license details.
85
*/
6+
declare(strict_types=1);
97

108
namespace Magento\Bundle\Test\Unit\Controller\Adminhtml\Product\Initialization\Helper\Plugin;
119

app/code/Magento/Bundle/Test/Unit/Model/Plugin/PriceBackendTest.php

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

1919
class PriceBackendTest extends TestCase
2020
{
21-
const CLOSURE_VALUE = 'CLOSURE';
21+
private const CLOSURE_VALUE = 'CLOSURE';
2222

2323
/** @var PriceBackend */
2424
private $priceBackendPlugin;

app/code/Magento/Captcha/Test/Unit/Model/DefaultTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class DefaultTest extends TestCase
3232
/**
3333
* Expiration frame
3434
*/
35-
const EXPIRE_FRAME = 86400;
35+
private const EXPIRE_FRAME = 86400;
3636

3737
/**
3838
* Captcha default config data

app/code/Magento/Captcha/Test/Unit/Observer/CheckUserForgotPasswordBackendObserverTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
*/
3030
class CheckUserForgotPasswordBackendObserverTest extends TestCase
3131
{
32-
const STUB_EMAIL = '[email protected]';
33-
const STUB_REQUEST_PARAMS = ['STUB_PARAM'];
32+
private const STUB_EMAIL = '[email protected]';
33+
private const STUB_REQUEST_PARAMS = ['STUB_PARAM'];
3434

3535
/**
3636
* @var MockObject|DataHelper

app/code/Magento/Catalog/Test/Unit/Model/Attribute/Backend/TierPrice/UpdateHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
class UpdateHandlerTest extends TestCase
3131
{
3232
/**
33-
* Magento\Framework\TestFramework\Unit\Helper\ObjectManager
33+
* @var Magento\Framework\TestFramework\Unit\Helper\ObjectManager
3434
*/
3535
private $objectManager;
3636

app/code/Magento/Directory/Test/Unit/Model/Config/Source/AllRegionTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ protected function setUp(): void
3535
{
3636
$objectManagerHelper = new ObjectManager($this);
3737

38-
$countryCollectionFactory = $this->getMockBuilder(
39-
CollectionFactory::class)
38+
$countryCollectionFactory = $this->getMockBuilder(CollectionFactory::class)
4039
->addMethods(['__wakeup', '__sleep'])
4140
->onlyMethods(['create'])
4241
->disableOriginalConstructor()

lib/internal/Magento/Framework/TestFramework/Unit/Helper/ObjectManager.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,9 @@ public function setBackwardCompatibleProperty($object, $propertyName, $propertyV
364364
}
365365

366366
/**
367-
* @param $map
367+
* Helper method to get mock of ObjectManagerInterface
368+
*
369+
* @param array $map
368370
*/
369371
public function prepareObjectManager($map)
370372
{

0 commit comments

Comments
 (0)