@@ -48,11 +48,6 @@ class DataProviderTest extends \PHPUnit\Framework\TestCase
48
48
*/
49
49
protected $ sessionMock ;
50
50
51
- /**
52
- * @var \Magento\Customer\Model\FileProcessorFactory|\PHPUnit_Framework_MockObject_MockObject
53
- */
54
- protected $ fileProcessorFactory ;
55
-
56
51
/**
57
52
* @var \Magento\Customer\Model\FileProcessor|\PHPUnit_Framework_MockObject_MockObject
58
53
*/
@@ -93,11 +88,6 @@ protected function setUp()
93
88
->disableOriginalConstructor ()
94
89
->setMethods (['overrideFileUploaderMetadata ' , 'overrideFileUploaderData ' ])
95
90
->getMock ();
96
-
97
- $ this ->fileProcessorFactory = $ this ->getMockBuilder (\Magento \Customer \Model \FileProcessorFactory::class)
98
- ->disableOriginalConstructor ()
99
- ->setMethods (['create ' ])
100
- ->getMock ();
101
91
}
102
92
103
93
/**
@@ -125,12 +115,6 @@ public function testGetAttributesMetaWithOptions(array $expected)
125
115
]
126
116
);
127
117
128
- $ helper ->setBackwardCompatibleProperty (
129
- $ dataProvider ,
130
- 'fileProcessorFactory ' ,
131
- $ this ->fileProcessorFactory
132
- );
133
-
134
118
$ meta = $ dataProvider ->getMeta ();
135
119
$ this ->assertNotEmpty ($ meta );
136
120
$ this ->assertEquals ($ expected , $ meta );
@@ -635,12 +619,6 @@ public function testGetData()
635
619
->method ('getCustomerFormData ' )
636
620
->willReturn (null );
637
621
638
- $ helper ->setBackwardCompatibleProperty (
639
- $ dataProvider ,
640
- 'fileProcessorFactory ' ,
641
- $ this ->fileProcessorFactory
642
- );
643
-
644
622
$ this ->assertEquals (
645
623
[
646
624
'' => [
@@ -766,12 +744,6 @@ public function testGetDataWithCustomerFormData()
766
744
$ this ->sessionMock ->expects ($ this ->once ())
767
745
->method ('unsCustomerFormData ' );
768
746
769
- $ helper ->setBackwardCompatibleProperty (
770
- $ dataProvider ,
771
- 'fileProcessorFactory ' ,
772
- $ this ->fileProcessorFactory
773
- );
774
-
775
747
$ this ->assertEquals ([$ customerId => $ customerFormData ], $ dataProvider ->getData ());
776
748
}
777
749
@@ -836,11 +808,6 @@ public function testGetDataWithCustomAttributeImage()
836
808
$ this ->sessionMock
837
809
);
838
810
839
- $ objectManager ->setBackwardCompatibleProperty (
840
- $ dataProvider ,
841
- 'fileProcessorFactory ' ,
842
- $ this ->fileProcessorFactory
843
- );
844
811
$ this ->fileUploaderDataResolver ->expects ($ this ->atLeastOnce ())->method ('overrideFileUploaderData ' )
845
812
->with (
846
813
$ customerMock ,
@@ -940,13 +907,6 @@ function ($origName) {
940
907
'file_extensions ' => 'ext1, eXt2 ' , // Added spaces and upper-cases
941
908
]);
942
909
943
- $ this ->fileProcessorFactory ->expects ($ this ->any ())
944
- ->method ('create ' )
945
- ->with ([
946
- 'entityTypeCode ' => CustomerMetadataInterface::ENTITY_TYPE_CUSTOMER ,
947
- ])
948
- ->willReturn ($ this ->fileProcessor );
949
-
950
910
$ objectManager = new ObjectManager ($ this );
951
911
$ dataProvider = $ objectManager ->getObject (
952
912
\Magento \Customer \Model \Customer \DataProvider::class,
@@ -956,8 +916,7 @@ function ($origName) {
956
916
'requestFieldName ' => 'request-field-name ' ,
957
917
'eavValidationRules ' => $ this ->eavValidationRulesMock ,
958
918
'customerCollectionFactory ' => $ this ->customerCollectionFactoryMock ,
959
- 'eavConfig ' => $ this ->eavConfigMock ,
960
- 'fileProcessorFactory ' => $ this ->fileProcessorFactory ,
919
+ 'eavConfig ' => $ this ->eavConfigMock
961
920
]
962
921
);
963
922
@@ -1057,12 +1016,6 @@ public function testGetDataWithVisibleAttributes()
1057
1016
]
1058
1017
);
1059
1018
1060
- $ helper ->setBackwardCompatibleProperty (
1061
- $ dataProvider ,
1062
- 'fileProcessorFactory ' ,
1063
- $ this ->fileProcessorFactory
1064
- );
1065
-
1066
1019
$ meta = $ dataProvider ->getMeta ();
1067
1020
$ this ->assertNotEmpty ($ meta );
1068
1021
$ this ->assertEquals ($ this ->getExpectationForVisibleAttributes (), $ meta );
@@ -1131,11 +1084,6 @@ public function testGetDataWithVisibleAttributesWithAccountEdit()
1131
1084
1132
1085
]
1133
1086
);
1134
- $ helper ->setBackwardCompatibleProperty (
1135
- $ dataProvider ,
1136
- 'fileProcessorFactory ' ,
1137
- $ this ->fileProcessorFactory
1138
- );
1139
1087
1140
1088
$ meta = $ dataProvider ->getMeta ();
1141
1089
$ this ->assertNotEmpty ($ meta );
0 commit comments