@@ -386,94 +386,68 @@ public function testModifyData()
386
386
]
387
387
];
388
388
389
- $ this ->attributeCollectionFactoryMock ->expects ($ this ->once ())
390
- ->method ('create ' )
389
+ $ this ->attributeCollectionFactoryMock ->expects ($ this ->once ())->method ('create ' )
391
390
->willReturn ($ this ->attributeCollectionMock );
392
391
393
- $ this ->attributeCollectionMock ->expects ($ this ->any ())
394
- ->method ('getItems ' )
392
+ $ this ->attributeCollectionMock ->expects ($ this ->any ())->method ('getItems ' )
395
393
->willReturn ([
396
394
$ this ->eavAttributeMock
397
395
]);
398
396
399
- $ this ->locatorMock ->expects ($ this ->any ())
400
- ->method ('getProduct ' )
397
+ $ this ->locatorMock ->expects ($ this ->any ())->method ('getProduct ' )
401
398
->willReturn ($ this ->productMock );
402
399
403
- $ this ->productMock ->expects ($ this ->any ())
404
- ->method ('getId ' )
400
+ $ this ->productMock ->expects ($ this ->any ())->method ('getId ' )
405
401
->willReturn (1 );
406
- $ this ->productMock ->expects ($ this ->once ())
407
- ->method ('getAttributeSetId ' )
402
+ $ this ->productMock ->expects ($ this ->once ())->method ('getAttributeSetId ' )
408
403
->willReturn (4 );
409
- $ this ->productMock ->expects ($ this ->once ())
410
- ->method ('getData ' )
404
+ $ this ->productMock ->expects ($ this ->once ())->method ('getData ' )
411
405
->with (ProductAttributeInterface::CODE_PRICE )->willReturn ('19.9900 ' );
412
406
413
- $ this ->searchCriteriaBuilderMock ->expects ($ this ->any ())
414
- ->method ('addFilter ' )
407
+ $ this ->searchCriteriaBuilderMock ->expects ($ this ->any ())->method ('addFilter ' )
415
408
->willReturnSelf ();
416
- $ this ->searchCriteriaBuilderMock ->expects ($ this ->any ())
417
- ->method ('create ' )
409
+ $ this ->searchCriteriaBuilderMock ->expects ($ this ->any ())->method ('create ' )
418
410
->willReturn ($ this ->searchCriteriaMock );
419
- $ this ->attributeGroupRepositoryMock ->expects ($ this ->any ())
420
- ->method ('getList ' )
411
+ $ this ->attributeGroupRepositoryMock ->expects ($ this ->any ())->method ('getList ' )
421
412
->willReturn ($ this ->searchCriteriaMock );
422
- $ this ->searchCriteriaMock ->expects ($ this ->once ())
423
- ->method ('getItems ' )
413
+ $ this ->searchCriteriaMock ->expects ($ this ->once ())->method ('getItems ' )
424
414
->willReturn ([$ this ->attributeGroupMock ]);
425
- $ this ->sortOrderBuilderMock ->expects ($ this ->once ())
426
- ->method ('setField ' )
415
+ $ this ->sortOrderBuilderMock ->expects ($ this ->once ())->method ('setField ' )
427
416
->willReturnSelf ();
428
- $ this ->sortOrderBuilderMock ->expects ($ this ->once ())
429
- ->method ('setAscendingDirection ' )
417
+ $ this ->sortOrderBuilderMock ->expects ($ this ->once ())->method ('setAscendingDirection ' )
430
418
->willReturnSelf ();
431
419
$ dataObjectMock = $ this ->createMock (\Magento \Framework \Api \AbstractSimpleObject::class);
432
- $ this ->sortOrderBuilderMock ->expects ($ this ->once ())
433
- ->method ('create ' )
420
+ $ this ->sortOrderBuilderMock ->expects ($ this ->once ())->method ('create ' )
434
421
->willReturn ($ dataObjectMock );
435
422
436
- $ this ->searchCriteriaBuilderMock ->expects ($ this ->any ())
437
- ->method ('addFilter ' )
423
+ $ this ->searchCriteriaBuilderMock ->expects ($ this ->any ())->method ('addFilter ' )
438
424
->willReturnSelf ();
439
- $ this ->searchCriteriaBuilderMock ->expects ($ this ->once ())
440
- ->method ('addSortOrder ' )
425
+ $ this ->searchCriteriaBuilderMock ->expects ($ this ->once ())->method ('addSortOrder ' )
441
426
->willReturnSelf ();
442
- $ this ->searchCriteriaBuilderMock ->expects ($ this ->any ())
443
- ->method ('create ' )
427
+ $ this ->searchCriteriaBuilderMock ->expects ($ this ->any ())->method ('create ' )
444
428
->willReturn ($ this ->searchCriteriaMock );
445
429
446
- $ this ->attributeRepositoryMock ->expects ($ this ->once ())
447
- ->method ('getList ' )
430
+ $ this ->attributeRepositoryMock ->expects ($ this ->once ())->method ('getList ' )
448
431
->with ($ this ->searchCriteriaMock )
449
432
->willReturn ($ this ->searchResultsMock );
450
- $ this ->eavAttributeMock ->expects ($ this ->any ())
451
- ->method ('getAttributeGroupCode ' )
433
+ $ this ->eavAttributeMock ->expects ($ this ->any ())->method ('getAttributeGroupCode ' )
452
434
->willReturn ('product-details ' );
453
- $ this ->eavAttributeMock ->expects ($ this ->once ())
454
- ->method ('getApplyTo ' )
435
+ $ this ->eavAttributeMock ->expects ($ this ->once ())->method ('getApplyTo ' )
455
436
->willReturn ([]);
456
- $ this ->eavAttributeMock ->expects ($ this ->once ())
457
- ->method ('getFrontendInput ' )
437
+ $ this ->eavAttributeMock ->expects ($ this ->once ())->method ('getFrontendInput ' )
458
438
->willReturn ('price ' );
459
- $ this ->eavAttributeMock ->expects ($ this ->any ())
460
- ->method ('getAttributeCode ' )
439
+ $ this ->eavAttributeMock ->expects ($ this ->any ())->method ('getAttributeCode ' )
461
440
->willReturn (ProductAttributeInterface::CODE_PRICE );
462
- $ this ->searchResultsMock ->expects ($ this ->once ())
463
- ->method ('getItems ' )
441
+ $ this ->searchResultsMock ->expects ($ this ->once ())->method ('getItems ' )
464
442
->willReturn ([$ this ->eavAttributeMock ]);
465
443
466
- $ this ->storeMock ->expects (($ this ->once ()))
467
- ->method ('getBaseCurrencyCode ' )
444
+ $ this ->storeMock ->expects (($ this ->once ()))->method ('getBaseCurrencyCode ' )
468
445
->willReturn ('en_US ' );
469
- $ this ->storeManagerMock ->expects ($ this ->once ())
470
- ->method ('getStore ' )
446
+ $ this ->storeManagerMock ->expects ($ this ->once ())->method ('getStore ' )
471
447
->willReturn ($ this ->storeMock );
472
- $ this ->currencyMock ->expects ($ this ->once ())
473
- ->method ('toCurrency ' )
448
+ $ this ->currencyMock ->expects ($ this ->once ())->method ('toCurrency ' )
474
449
->willReturn ('19.99 ' );
475
- $ this ->currencyLocaleMock ->expects ($ this ->once ())
476
- ->method ('getCurrency ' )
450
+ $ this ->currencyLocaleMock ->expects ($ this ->once ())->method ('getCurrency ' )
477
451
->willReturn ($ this ->currencyMock );
478
452
479
453
$ this ->assertEquals ($ sourceData , $ this ->eav ->modifyData ([]));
0 commit comments