@@ -73,9 +73,6 @@ class OrderTest extends \PHPUnit_Framework_TestCase
73
73
*/
74
74
protected $ productCollectionFactoryMock ;
75
75
76
- /**
77
- * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
78
- */
79
76
protected function setUp ()
80
77
{
81
78
$ helper = new \Magento \Framework \TestFramework \Unit \Helper \ObjectManager ($ this );
@@ -140,18 +137,10 @@ protected function setUp()
140
137
'' ,
141
138
false
142
139
);
143
- $ collection ->expects ($ this ->any ())
144
- ->method ('setOrderFilter ' )
145
- ->willReturnSelf ();
146
- $ collection ->expects ($ this ->any ())
147
- ->method ('getItems ' )
148
- ->willReturn ([$ this ->item ]);
149
- $ collection ->expects ($ this ->any ())
150
- ->method ('getIterator ' )
151
- ->willReturn (new \ArrayIterator ([$ this ->item ]));
152
- $ this ->orderItemCollectionFactoryMock ->expects ($ this ->any ())
153
- ->method ('create ' )
154
- ->willReturn ($ collection );
140
+ $ collection ->expects ($ this ->any ())->method ('setOrderFilter ' )->willReturnSelf ();
141
+ $ collection ->expects ($ this ->any ())->method ('getItems ' )->willReturn ([$ this ->item ]);
142
+ $ collection ->expects ($ this ->any ())->method ('getIterator ' )->willReturn (new \ArrayIterator ([$ this ->item ]));
143
+ $ this ->orderItemCollectionFactoryMock ->expects ($ this ->any ())->method ('create ' )->willReturn ($ collection );
155
144
156
145
$ this ->priceCurrency = $ this ->getMockForAbstractClass (
157
146
\Magento \Framework \Pricing \PriceCurrencyInterface::class,
@@ -162,14 +151,10 @@ protected function setUp()
162
151
true ,
163
152
['round ' ]
164
153
);
165
-
166
154
$ this ->incrementId = '#00000001 ' ;
167
155
$ this ->eventManager = $ this ->getMock (\Magento \Framework \Event \Manager::class, [], [], '' , false );
168
156
$ context = $ this ->getMock (\Magento \Framework \Model \Context::class, ['getEventDispatcher ' ], [], '' , false );
169
- $ context ->expects ($ this ->any ())
170
- ->method ('getEventDispatcher ' )
171
- ->willReturn ($ this ->eventManager );
172
-
157
+ $ context ->expects ($ this ->any ())->method ('getEventDispatcher ' )->willReturn ($ this ->eventManager );
173
158
$ this ->order = $ helper ->getObject (
174
159
\Magento \Sales \Model \Order::class,
175
160
[
0 commit comments