Skip to content

Commit

Permalink
conflict resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
engcom-Echo committed May 13, 2020
1 parent ea41479 commit 1486300
Showing 1 changed file with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@
use Magento\Framework\Api\FilterBuilder;
use Magento\Framework\Api\SearchCriteria;
use Magento\Framework\Api\SearchCriteriaBuilder;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Framework\Indexer\ActionInterface;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;

/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class ProductTest extends TestCase
{
/**
Expand All @@ -39,7 +41,7 @@ class ProductTest extends TestCase
private $objectManagerHelper;

/**
* @var Configurable|\PHPUnit_Framework_MockObject_MockObject
* @var Configurable|MockObject
*/
private $configurableMock;

Expand All @@ -65,7 +67,6 @@ class ProductTest extends TestCase

protected function setUp(): void
{
$this->objectManagerHelper = new ObjectManagerHelper($this);
$this->configurableMock = $this->createMock(Configurable::class);
$this->actionMock = $this->getMockForAbstractClass(ActionInterface::class);
$this->productAttributeRepositoryMock = $this->getMockBuilder(ProductAttributeRepositoryInterface::class)
Expand All @@ -80,6 +81,7 @@ protected function setUp(): void
FilterBuilder::class,
['setField', 'setConditionType', 'setValue', 'create']
);
$this->objectManagerHelper = new ObjectManagerHelper($this);
$this->model = $this->objectManagerHelper->getObject(
PluginResourceModelProduct::class,
[
Expand Down Expand Up @@ -110,11 +112,10 @@ public function testBeforeSaveConfigurable(): void
Configurable::class,
['getSetAttributes']
);

$extensionAttributes = $this->createPartialMock(
ExtensionAttributesInterface::class,
['getConfigurableProductOptions']
);
$extensionAttributes = $this->getMockBuilder(ExtensionAttributesInterface::class)
->disableOriginalConstructor()
->addMethods(['getConfigurableProductOptions'])
->getMock();
$option = $this->createPartialMock(
ConfigurableAttribute::class,
['getAttributeId']
Expand Down Expand Up @@ -142,7 +143,6 @@ public function testBeforeSaveConfigurable(): void
$this->searchCriteriaBuilderMock->expects($this->once())
->method('create')
->willReturn($searchCriteria);

$searchResultMockClass = $this->createPartialMock(
ProductAttributeSearchResults::class,
['getItems']
Expand All @@ -161,7 +161,6 @@ public function testBeforeSaveConfigurable(): void
$type->expects($this->once())
->method('getSetAttributes')
->with($object);

$object->expects($this->once())
->method('getTypeId')
->will($this->returnValue(Configurable::TYPE_CODE));
Expand Down

0 comments on commit 1486300

Please sign in to comment.