Skip to content

Commit 4f14d4a

Browse files
committed
MAGETWO-97161: Static tests failed on mainline
1 parent 2f6c241 commit 4f14d4a

File tree

1 file changed

+1
-53
lines changed

1 file changed

+1
-53
lines changed

app/code/Magento/Customer/Test/Unit/Model/Customer/DataProviderTest.php

Lines changed: 1 addition & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ class DataProviderTest extends \PHPUnit\Framework\TestCase
4848
*/
4949
protected $sessionMock;
5050

51-
/**
52-
* @var \Magento\Customer\Model\FileProcessorFactory|\PHPUnit_Framework_MockObject_MockObject
53-
*/
54-
protected $fileProcessorFactory;
55-
5651
/**
5752
* @var \Magento\Customer\Model\FileProcessor|\PHPUnit_Framework_MockObject_MockObject
5853
*/
@@ -93,11 +88,6 @@ protected function setUp()
9388
->disableOriginalConstructor()
9489
->setMethods(['overrideFileUploaderMetadata', 'overrideFileUploaderData'])
9590
->getMock();
96-
97-
$this->fileProcessorFactory = $this->getMockBuilder(\Magento\Customer\Model\FileProcessorFactory::class)
98-
->disableOriginalConstructor()
99-
->setMethods(['create'])
100-
->getMock();
10191
}
10292

10393
/**
@@ -125,12 +115,6 @@ public function testGetAttributesMetaWithOptions(array $expected)
125115
]
126116
);
127117

128-
$helper->setBackwardCompatibleProperty(
129-
$dataProvider,
130-
'fileProcessorFactory',
131-
$this->fileProcessorFactory
132-
);
133-
134118
$meta = $dataProvider->getMeta();
135119
$this->assertNotEmpty($meta);
136120
$this->assertEquals($expected, $meta);
@@ -635,12 +619,6 @@ public function testGetData()
635619
->method('getCustomerFormData')
636620
->willReturn(null);
637621

638-
$helper->setBackwardCompatibleProperty(
639-
$dataProvider,
640-
'fileProcessorFactory',
641-
$this->fileProcessorFactory
642-
);
643-
644622
$this->assertEquals(
645623
[
646624
'' => [
@@ -766,12 +744,6 @@ public function testGetDataWithCustomerFormData()
766744
$this->sessionMock->expects($this->once())
767745
->method('unsCustomerFormData');
768746

769-
$helper->setBackwardCompatibleProperty(
770-
$dataProvider,
771-
'fileProcessorFactory',
772-
$this->fileProcessorFactory
773-
);
774-
775747
$this->assertEquals([$customerId => $customerFormData], $dataProvider->getData());
776748
}
777749

@@ -836,11 +808,6 @@ public function testGetDataWithCustomAttributeImage()
836808
$this->sessionMock
837809
);
838810

839-
$objectManager->setBackwardCompatibleProperty(
840-
$dataProvider,
841-
'fileProcessorFactory',
842-
$this->fileProcessorFactory
843-
);
844811
$this->fileUploaderDataResolver->expects($this->atLeastOnce())->method('overrideFileUploaderData')
845812
->with(
846813
$customerMock,
@@ -940,13 +907,6 @@ function ($origName) {
940907
'file_extensions' => 'ext1, eXt2 ', // Added spaces and upper-cases
941908
]);
942909

943-
$this->fileProcessorFactory->expects($this->any())
944-
->method('create')
945-
->with([
946-
'entityTypeCode' => CustomerMetadataInterface::ENTITY_TYPE_CUSTOMER,
947-
])
948-
->willReturn($this->fileProcessor);
949-
950910
$objectManager = new ObjectManager($this);
951911
$dataProvider = $objectManager->getObject(
952912
\Magento\Customer\Model\Customer\DataProvider::class,
@@ -956,8 +916,7 @@ function ($origName) {
956916
'requestFieldName' => 'request-field-name',
957917
'eavValidationRules' => $this->eavValidationRulesMock,
958918
'customerCollectionFactory' => $this->customerCollectionFactoryMock,
959-
'eavConfig' => $this->eavConfigMock,
960-
'fileProcessorFactory' => $this->fileProcessorFactory,
919+
'eavConfig' => $this->eavConfigMock
961920
]
962921
);
963922

@@ -1057,12 +1016,6 @@ public function testGetDataWithVisibleAttributes()
10571016
]
10581017
);
10591018

1060-
$helper->setBackwardCompatibleProperty(
1061-
$dataProvider,
1062-
'fileProcessorFactory',
1063-
$this->fileProcessorFactory
1064-
);
1065-
10661019
$meta = $dataProvider->getMeta();
10671020
$this->assertNotEmpty($meta);
10681021
$this->assertEquals($this->getExpectationForVisibleAttributes(), $meta);
@@ -1131,11 +1084,6 @@ public function testGetDataWithVisibleAttributesWithAccountEdit()
11311084

11321085
]
11331086
);
1134-
$helper->setBackwardCompatibleProperty(
1135-
$dataProvider,
1136-
'fileProcessorFactory',
1137-
$this->fileProcessorFactory
1138-
);
11391087

11401088
$meta = $dataProvider->getMeta();
11411089
$this->assertNotEmpty($meta);

0 commit comments

Comments
 (0)