Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Coding standards in TypeLocatorTest #12977

Merged
merged 1 commit into from
Jan 5, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions app/code/Magento/Eav/Test/Unit/Model/TypeLocatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

namespace Magento\Eav\Test\Unit\Model;

use Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface;
use Magento\Eav\Model\TypeLocator;
use Magento\Eav\Model\TypeLocator\ComplexType as ComplexTypeLocator;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
Expand Down Expand Up @@ -66,7 +65,10 @@ public function testGetType(
$expected
) {
$this->complexType->expects($this->once())->method('getType')->willReturn($expected);
$type = $this->customAttributeTypeLocator->getType($attributeCode, $serviceEntityTypeMapData[$serviceClass]);
$type = $this->customAttributeTypeLocator->getType(
$attributeCode,
$serviceEntityTypeMapData[$serviceClass]
);

$this->assertEquals($expected, $type, 'Expected: ' . $expected . 'but got: ' . $type);
}
Expand All @@ -79,16 +81,22 @@ public function getTypeDataProvider()
{
$serviceInterface = \Magento\Catalog\Api\Data\ProductInterface::class;
$eavEntityType = 'catalog_product';
$mediaBackEndModelClass = \Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface::class;
$mediaAttributeDataInterface = \Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface::class;
$mediaBackEndModelClass = ProductAttributeMediaGalleryEntryInterface::class;
$mediaAttributeDataInterface = ProductAttributeMediaGalleryEntryInterface::class;

$attribute = $this->createPartialMock(\Magento\Catalog\Model\ResourceModel\Eav\Attribute::class, ['getBackendModel']);
$attribute = $this->createPartialMock(
\Magento\Catalog\Model\ResourceModel\Eav\Attribute::class,
['getBackendModel']
);

$attribute->expects($this->any())
->method('getBackendModel')
->willReturn($mediaBackEndModelClass);

$attributeNoBackendModel = $this->createPartialMock(\Magento\Catalog\Model\ResourceModel\Eav\Attribute::class, ['getBackendModel', 'getFrontendInput']);
$attributeNoBackendModel = $this->createPartialMock(
\Magento\Catalog\Model\ResourceModel\Eav\Attribute::class,
['getBackendModel', 'getFrontendInput']
);

$attributeNoBackendModel->expects($this->any())
->method('getBackendModel')
Expand Down