@@ -431,13 +431,8 @@ public function hasDataChangedDataProvider()
431
431
public function testPrepareDataForUpdate ()
432
432
{
433
433
$ adapterInterfaceMock = $ this ->getMock ('\Magento\Framework\DB\Adapter\AdapterInterface ' , [], [], '' , false );
434
- $ contextMock = new \Magento \Framework \Model \Context (
435
- $ this ->getMock ('Psr\Log\LoggerInterface ' ),
436
- $ this ->getMock ('Magento\Framework\Event\ManagerInterface ' , [], [], '' , false ),
437
- $ this ->getMock ('Magento\Framework\App\CacheInterface ' , [], [], '' , false ),
438
- $ this ->getMock ('Magento\Framework\App\State ' , [], [], '' , false ),
439
- $ this ->getMock ('\Magento\Framework\Model\ActionValidator\RemoveAction ' , [], [], '' , false ),
440
- $ this ->getMock ('\Magento\Framework\Model\Resource\Db\ObjectRelationProcessor ' , [], [], '' , false )
434
+ $ context = (new \Magento \Framework \TestFramework \Unit \Helper \ObjectManager ($ this ))->getObject (
435
+ 'Magento\Framework\Model\Context '
441
436
);
442
437
$ registryMock = $ this ->getMock ('\Magento\Framework\Registry ' , [], [], '' , false );
443
438
$ resourceMock = $ this ->getMock (
@@ -460,7 +455,7 @@ public function testPrepareDataForUpdate()
460
455
$ resourceCollectionMock = $ this ->getMock ('Magento\Framework\Data\Collection\Db ' , [], [], '' , false );
461
456
$ abstractModelMock = $ this ->getMockForAbstractClass (
462
457
'Magento\Framework\Model\AbstractModel ' ,
463
- [$ contextMock , $ registryMock , $ resourceMock , $ resourceCollectionMock ]
458
+ [$ context , $ registryMock , $ resourceMock , $ resourceCollectionMock ]
464
459
);
465
460
$ data = 'tableName ' ;
466
461
$ this ->_resourcesMock ->expects ($ this ->any ())
0 commit comments