Skip to content

Commit 7cad476

Browse files
committed
Fix bug 26449: Fix code standard
1 parent ec6bb30 commit 7cad476

File tree

1 file changed

+14
-11
lines changed
  • app/code/Magento/ConfigurableProduct/Test/Unit/Plugin/Model/ResourceModel

1 file changed

+14
-11
lines changed

app/code/Magento/ConfigurableProduct/Test/Unit/Plugin/Model/ResourceModel/ProductTest.php

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66

77
namespace Magento\ConfigurableProduct\Test\Unit\Plugin\Model\ResourceModel;
88

9+
use Magento\Catalog\Api\ProductAttributeRepositoryInterface;
910
use Magento\Catalog\Model\Product\Type;
11+
use Magento\Catalog\Model\ProductAttributeSearchResults;
12+
use Magento\Catalog\Model\ResourceModel\Eav\Attribute as EavAttribute;
1013
use Magento\ConfigurableProduct\Model\Product\Type\Configurable;
11-
use Magento\Framework\Indexer\ActionInterface;
12-
use Magento\Catalog\Api\ProductAttributeRepositoryInterface;
14+
use Magento\ConfigurableProduct\Model\Product\Type\Configurable\Attribute as ConfigurableAttribute;
15+
use Magento\Framework\Api\ExtensionAttributesInterface;
16+
use Magento\Framework\Api\FilterBuilder;
1317
use Magento\Framework\Api\SearchCriteriaBuilder;
1418
use Magento\Framework\Api\SearchCriteria;
15-
use Magento\Framework\Api\FilterBuilder;
16-
use Magento\Framework\Api\ExtensionAttributesInterface;
17-
use Magento\ConfigurableProduct\Model\Product\Type\Configurable\Attribute as ConfigurableAttribute;
18-
use Magento\Catalog\Model\ProductAttributeSearchResults;
19-
use Magento\Catalog\Model\ResourceModel\Eav\Attribute as EavAttribute;
19+
use Magento\Framework\Indexer\ActionInterface;
2020

2121
class ProductTest extends \PHPUnit\Framework\TestCase
2222
{
@@ -39,14 +39,17 @@ class ProductTest extends \PHPUnit\Framework\TestCase
3939
* @var \Magento\ConfigurableProduct\Plugin\Model\ResourceModel\Product
4040
*/
4141
private $model;
42+
4243
/**
4344
* @var ProductAttributeRepositoryInterface|\PHPUnit\Framework\MockObject\MockObject
4445
*/
45-
private $prdAttributeRepositoryMock;
46+
private $productAttributeRepositoryMock;
47+
4648
/**
4749
* @var SearchCriteriaBuilder|\PHPUnit\Framework\MockObject\MockObject
4850
*/
4951
private $searchCriteriaBuilderMock;
52+
5053
/**
5154
* @var FilterBuilder|\PHPUnit\Framework\MockObject\MockObject
5255
*/
@@ -57,7 +60,7 @@ public function setUp()
5760
$this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
5861
$this->configurableMock = $this->createMock(Configurable::class);
5962
$this->actionMock = $this->createMock(ActionInterface::class);
60-
$this->prdAttributeRepositoryMock = $this->getMockBuilder(ProductAttributeRepositoryInterface::class)
63+
$this->productAttributeRepositoryMock = $this->getMockBuilder(ProductAttributeRepositoryInterface::class)
6164
->disableOriginalConstructor()
6265
->setMethods(['getList'])
6366
->getMockForAbstractClass();
@@ -75,7 +78,7 @@ public function setUp()
7578
[
7679
'configurable' => $this->configurableMock,
7780
'productIndexer' => $this->actionMock,
78-
'productAttributeRepository' => $this->prdAttributeRepositoryMock,
81+
'productAttributeRepository' => $this->productAttributeRepositoryMock,
7982
'searchCriteriaBuilder' => $this->searchCriteriaBuilderMock,
8083
'filterBuilder' => $this->filterBuilderMock
8184
]
@@ -125,7 +128,7 @@ public function testBeforeSaveConfigurable()
125128
ProductAttributeSearchResults::class,
126129
['getItems']
127130
);
128-
$this->prdAttributeRepositoryMock->expects($this->once())
131+
$this->productAttributeRepositoryMock->expects($this->once())
129132
->method('getList')->with($searchCriteria)->willReturn($searchResultMockClass);
130133
$optionAttribute = $this->createPartialMock(
131134
EavAttribute::class,

0 commit comments

Comments
 (0)