@@ -18,9 +18,13 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
18
18
protected function setUp ()
19
19
{
20
20
$ resource = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ()->get ('Magento\Framework\App\Resource ' );
21
- $ this ->_model = $ this ->getMockForAbstractClass ('Magento\Framework\Model\Resource\Db\AbstractDb ' ,
21
+ $ context = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ()->create (
22
+ '\Magento\Framework\Model\Resource\Db\Context ' ,
22
23
['resource ' => $ resource ]
23
24
);
25
+ $ this ->_model = $ this ->getMockForAbstractClass ('Magento\Framework\Model\Resource\Db\AbstractDb ' ,
26
+ ['context ' => $ context ]
27
+ );
24
28
}
25
29
26
30
public function testConstruct ()
@@ -54,9 +58,13 @@ public function testGetTableName()
54
58
'Magento\Framework\App\Resource ' ,
55
59
['tablePrefix ' => 'prefix_ ' ]
56
60
);
61
+ $ context = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ()->create (
62
+ '\Magento\Framework\Model\Resource\Db\Context ' ,
63
+ ['resource ' => $ resource ]
64
+ );
57
65
58
66
$ model = $ this ->getMockForAbstractClass ('Magento\Framework\Model\Resource\Db\AbstractDb ' ,
59
- ['resource ' => $ resource ]
67
+ ['context ' => $ context ]
60
68
);
61
69
62
70
$ tableName = $ model ->getTable ([$ tableNameOrig , $ tableSuffix ]);
0 commit comments