28
28
use Magento \Framework \Api \SearchCriteria \CollectionProcessorInterface ;
29
29
use Magento \Framework \Api \SearchCriteriaBuilder ;
30
30
use Magento \Framework \DB \Adapter \ConnectionException ;
31
- use Magento \Framework \EntityManager \Operation \Read \ReadExtensions ;
32
31
use Magento \Framework \Filesystem ;
33
32
use Magento \Framework \Serialize \Serializer \Json ;
34
33
use Magento \Framework \TestFramework \Unit \Helper \ObjectManager ;
@@ -180,11 +179,6 @@ class ProductRepositoryTest extends \PHPUnit\Framework\TestCase
180
179
*/
181
180
private $ cacheLimit = 2 ;
182
181
183
- /**
184
- * @var ReadExtensions|\PHPUnit_Framework_MockObject_MockObject
185
- */
186
- private $ readExtensionsMock ;
187
-
188
182
/**
189
183
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
190
184
*/
@@ -298,8 +292,6 @@ function ($value) {
298
292
}
299
293
)
300
294
);
301
- $ this ->readExtensionsMock = $ this ->getMockBuilder (ReadExtensions::class)
302
- ->disableOriginalConstructor ()->getMock ();
303
295
304
296
$ this ->model = $ this ->objectManager ->getObject (
305
297
ProductRepository::class,
@@ -323,8 +315,7 @@ function ($value) {
323
315
'mediaGalleryProcessor ' => $ this ->mediaGalleryProcessor ,
324
316
'collectionProcessor ' => $ this ->collectionProcessor ,
325
317
'serializer ' => $ this ->serializerMock ,
326
- 'cacheLimit ' => $ this ->cacheLimit ,
327
- 'readExtensions ' => $ this ->readExtensionsMock ,
318
+ 'cacheLimit ' => $ this ->cacheLimit
328
319
]
329
320
);
330
321
}
@@ -777,8 +768,6 @@ public function testGetList()
777
768
$ collectionMock ->expects ($ this ->once ())->method ('load ' );
778
769
$ collectionMock ->expects ($ this ->once ())->method ('addCategoryIds ' );
779
770
$ collectionMock ->expects ($ this ->atLeastOnce ())->method ('getItems ' )->willReturn ([$ this ->product ]);
780
- $ this ->readExtensionsMock ->expects ($ this ->once ())->method ('execute ' )->with ($ this ->product );
781
- $ collectionMock ->expects ($ this ->atLeastOnce ())->method ('getItems ' )->willReturn ([$ this ->product ]);
782
771
$ collectionMock ->expects ($ this ->once ())->method ('getSize ' )->willReturn (128 );
783
772
$ searchResultsMock = $ this ->createMock (\Magento \Catalog \Api \Data \ProductSearchResultsInterface::class);
784
773
$ searchResultsMock ->expects ($ this ->once ())->method ('setSearchCriteria ' )->with ($ searchCriteriaMock );
0 commit comments