Skip to content

Commit

Permalink
resolved conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
engcom-Echo committed May 18, 2020
1 parent 7d2d0d3 commit eb34341
Showing 1 changed file with 33 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,110 +7,116 @@

namespace Magento\Catalog\Test\Unit\Controller\Adminhtml\Product\Attribute;

use Magento\Backend\Model\Session;
use Magento\Backend\Model\View\Result\Redirect as ResultRedirect;
use Magento\Catalog\Api\Data\ProductAttributeInterface;
use Magento\Catalog\Controller\Adminhtml\Product\Attribute\Save;
use Magento\Eav\Model\Validator\Attribute\Code as AttributeCodeValidator;
use Magento\Framework\Serialize\Serializer\FormData;
use Magento\Catalog\Test\Unit\Controller\Adminhtml\Product\AttributeTest;
use Magento\Catalog\Model\Product\AttributeSet\BuildFactory;
use Magento\Catalog\Helper\Product as ProductHelper;
use Magento\Catalog\Model\Product\Attribute\Frontend\Inputtype\Presentation;
use Magento\Catalog\Model\Product\AttributeSet\Build;
use Magento\Catalog\Model\Product\AttributeSet\BuildFactory;
use Magento\Catalog\Model\ResourceModel\Eav\AttributeFactory;
use Magento\Catalog\Test\Unit\Controller\Adminhtml\Product\AttributeTest;
use Magento\Eav\Api\Data\AttributeSetInterface;
use Magento\Eav\Model\Adminhtml\System\Config\Source\Inputtype\Validator as InputTypeValidator;
use Magento\Eav\Model\Adminhtml\System\Config\Source\Inputtype\ValidatorFactory;
use Magento\Eav\Model\ResourceModel\Entity\Attribute\Group\CollectionFactory;
use Magento\Eav\Model\Validator\Attribute\Code as AttributeCodeValidator;
use Magento\Framework\Controller\ResultFactory;
use Magento\Framework\Exception\NotFoundException;
use Magento\Framework\Filter\FilterManager;
use Magento\Catalog\Helper\Product as ProductHelper;
use Magento\Framework\Serialize\Serializer\FormData;
use Magento\Framework\View\Element\Messages;
use Magento\Framework\View\LayoutFactory;
use Magento\Backend\Model\View\Result\Redirect as ResultRedirect;
use Magento\Eav\Model\Adminhtml\System\Config\Source\Inputtype\Validator as InputTypeValidator;
use Magento\Framework\View\LayoutInterface;
use PHPUnit\Framework\MockObject\MockObject;

/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @SuppressWarnings(PHPMD.TooManyFields)
*/
class SaveTest extends AttributeTest
{
/**
* @var BuildFactory|MockObject
*/
protected $buildFactoryMock;
private $buildFactoryMock;

/**
* @var FilterManager|MockObject
*/
protected $filterManagerMock;
private $filterManagerMock;

/**
* @var ProductHelper|MockObject
*/
protected $productHelperMock;
private $productHelperMock;

/**
* @var AttributeFactory|MockObject
*/
protected $attributeFactoryMock;
private $attributeFactoryMock;

/**
* @var ValidatorFactory|MockObject
*/
protected $validatorFactoryMock;
private $validatorFactoryMock;

/**
* @var CollectionFactory|MockObject
*/
protected $groupCollectionFactoryMock;
private $groupCollectionFactoryMock;

/**
* @var LayoutFactory|MockObject
*/
protected $layoutFactoryMock;
private $layoutFactoryMock;

/**
* @var ResultRedirect|MockObject
*/
protected $redirectMock;
private $redirectMock;

/**
* @var AttributeSet|MockObject
* @var AttributeSetInterface|MockObject
*/
protected $attributeSetMock;
private $attributeSetMock;

/**
* @var Build|MockObject
*/
protected $builderMock;
private $builderMock;

/**
* @var InputTypeValidator|MockObject
*/
protected $inputTypeValidatorMock;
private $inputTypeValidatorMock;

/**
* @var FormData|MockObject
*/
protected $formDataSerializerMock;
private $formDataSerializerMock;

/**
* @var ProductAttributeInterface|MockObject
*/
protected $productAttributeMock;
private $productAttributeMock;

/**
* @var Presentation|MockObject
* @var AttributeCodeValidator|MockObject
*/
private $formDataSerializerMock;
private $attributeCodeValidatorMock;

/**
* @var ProductAttributeInterface|\PHPUnit_Framework_MockObject_MockObject
* @var Presentation|MockObject
*/
private $productAttributeMock;
private $presentationMock;

/**
* @var AttributeCodeValidator|MockObject
* @var Session|MockObject
*/
private $attributeCodeValidatorMock;

private $sessionMock;

protected function setUp(): void
{
Expand All @@ -129,12 +135,6 @@ protected function setUp(): void
->setMethods(['create'])
->disableOriginalConstructor()
->getMock();
$this->filterManagerMock = $this->getMockBuilder(FilterManager::class)
->disableOriginalConstructor()
->getMock();
$this->productHelperMock = $this->getMockBuilder(ProductHelper::class)
->disableOriginalConstructor()
->getMock();
$this->attributeFactoryMock = $this->getMockBuilder(AttributeFactory::class)
->setMethods(['create'])
->disableOriginalConstructor()
Expand All @@ -147,28 +147,10 @@ protected function setUp(): void
->setMethods(['create'])
->disableOriginalConstructor()
->getMock();
$this->layoutFactoryMock = $this->getMockBuilder(LayoutFactory::class)
->disableOriginalConstructor()
->getMock();
$this->redirectMock = $this->getMockBuilder(ResultRedirect::class)
->setMethods(['setData', 'setPath'])
->disableOriginalConstructor()
->getMock();
$this->attributeSetMock = $this->getMockBuilder(AttributeSetInterface::class)
->disableOriginalConstructor()
->getMock();
$this->builderMock = $this->getMockBuilder(Build::class)
->disableOriginalConstructor()
->getMock();
$this->inputTypeValidatorMock = $this->getMockBuilder(InputTypeValidator::class)
->disableOriginalConstructor()
->getMock();
$this->formDataSerializerMock = $this->getMockBuilder(FormData::class)
->disableOriginalConstructor()
->getMock();
$this->attributeCodeValidatorMock = $this->getMockBuilder(AttributeCodeValidator::class)
->disableOriginalConstructor()
->getMock();
$this->productAttributeMock = $this->getMockBuilder(ProductAttributeInterface::class)
->setMethods(
[
Expand Down

0 comments on commit eb34341

Please sign in to comment.