8
8
9
9
use Magento \CustomerImportExport \Model \Import \Address ;
10
10
use Magento \ImportExport \Model \Import \AbstractEntity ;
11
+ use Magento \Framework \DB \Select ;
12
+ use Magento \Framework \DB \Adapter \AdapterInterface ;
13
+ use Magento \Customer \Model \ResourceModel \Customer \Collection ;
14
+ use Magento \Customer \Model \ResourceModel \Customer \CollectionFactory ;
15
+ use Magento \ImportExport \Model \ResourceModel \CollectionByPagesIteratorFactory ;
16
+ use Magento \CustomerImportExport \Model \ResourceModel \Import \Customer \Storage ;
11
17
12
18
/**
13
19
* Class AddressTest
@@ -233,14 +239,14 @@ protected function _createAttrCollectionMock()
233
239
*/
234
240
protected function _createCustomerStorageMock ()
235
241
{
236
- /** @var \Magento\Framework\DB\ Select|\PHPUnit_Framework_MockObject_MockObject $selectMock */
237
- $ selectMock = $ this ->getMockBuilder (\ Magento \ Framework \ DB \ Select::class)
242
+ /** @var Select|\PHPUnit_Framework_MockObject_MockObject $selectMock */
243
+ $ selectMock = $ this ->getMockBuilder (Select::class)
238
244
->disableOriginalConstructor ()
239
245
->setMethods (['from ' ])
240
246
->getMock ();
241
247
$ selectMock ->expects ($ this ->any ())->method ('from ' )->will ($ this ->returnSelf ());
242
248
243
- /** @var $connectionMock \Magento\Framework\DB\Adapter\ AdapterInterface|\PHPUnit_Framework_MockObject_MockObject */
249
+ /** @var $connectionMock AdapterInterface|\PHPUnit_Framework_MockObject_MockObject */
244
250
$ connectionMock = $ this ->getMockBuilder (\Magento \Framework \DB \Adapter \Pdo \Mysql::class)
245
251
->disableOriginalConstructor ()
246
252
->setMethods (['select ' , 'fetchAll ' ])
@@ -249,32 +255,32 @@ protected function _createCustomerStorageMock()
249
255
->method ('select ' )
250
256
->will ($ this ->returnValue ($ selectMock ));
251
257
252
- /** @var \Magento\Customer\Model\ResourceModel\Customer\ Collection|\PHPUnit_Framework_MockObject_MockObject $customerCollection */
253
- $ customerCollection = $ this ->getMockBuilder (\ Magento \ Customer \ Model \ ResourceModel \ Customer \ Collection::class)
258
+ /** @var Collection|\PHPUnit_Framework_MockObject_MockObject $customerCollection */
259
+ $ customerCollection = $ this ->getMockBuilder (Collection::class)
254
260
->disableOriginalConstructor ()
255
261
->setMethods (['getConnection ' ])
256
262
->getMock ();
257
263
$ customerCollection ->expects ($ this ->any ())
258
264
->method ('getConnection ' )
259
265
->will ($ this ->returnValue ($ connectionMock ));
260
266
261
- /** @var \Magento\Customer\Model\ResourceModel\Customer\ CollectionFactory|\PHPUnit_Framework_MockObject_MockObject $collectionFactory */
262
- $ collectionFactory = $ this ->getMockBuilder (\ Magento \ Customer \ Model \ ResourceModel \ Customer \ CollectionFactory::class)
267
+ /** @var CollectionFactory|\PHPUnit_Framework_MockObject_MockObject $collectionFactory */
268
+ $ collectionFactory = $ this ->getMockBuilder (CollectionFactory::class)
263
269
->disableOriginalConstructor ()
264
270
->setMethods (['create ' ])
265
271
->getMock ();
266
272
$ collectionFactory ->expects ($ this ->any ())
267
273
->method ('create ' )
268
274
->willReturn ($ customerCollection );
269
275
270
- /** @var \Magento\ImportExport\Model\ResourceModel\ CollectionByPagesIteratorFactory|\PHPUnit_Framework_MockObject_MockObject $byPagesIteratorFactory */
271
- $ byPagesIteratorFactory = $ this ->getMockBuilder (\ Magento \ ImportExport \ Model \ ResourceModel \ CollectionByPagesIteratorFactory::class)
276
+ /** @var CollectionByPagesIteratorFactory|\PHPUnit_Framework_MockObject_MockObject $byPagesIteratorFactory */
277
+ $ byPagesIteratorFactory = $ this ->getMockBuilder (CollectionByPagesIteratorFactory::class)
272
278
->disableOriginalConstructor ()
273
279
->setMethods (['create ' ])
274
280
->getMock ();
275
281
276
- /** @var \Magento\CustomerImportExport\Model\ResourceModel\Import\Customer\ Storage|\PHPUnit_Framework_MockObject_MockObject $customerStorage */
277
- $ customerStorage = $ this ->getMockBuilder (\ Magento \ CustomerImportExport \ Model \ ResourceModel \ Import \ Customer \ Storage::class)
282
+ /** @var Storage|\PHPUnit_Framework_MockObject_MockObject $customerStorage */
283
+ $ customerStorage = $ this ->getMockBuilder (Storage::class)
278
284
->setMethods (['load ' ])
279
285
->setConstructorArgs ([$ collectionFactory , $ byPagesIteratorFactory ])
280
286
->getMock ();
0 commit comments