@@ -37,10 +37,10 @@ class CategoryLinkTest extends \PHPUnit_Framework_TestCase
37
37
38
38
protected function setUp ()
39
39
{
40
- $ this ->resourceMock = $ this ->getMockBuilder (' Magento\Framework\App\ResourceConnection ' )
40
+ $ this ->resourceMock = $ this ->getMockBuilder (\ Magento \Framework \App \ResourceConnection::class )
41
41
->disableOriginalConstructor ()
42
42
->getMock ();
43
- $ this ->metadataPoolMock = $ this ->getMockBuilder (' Magento\Framework\EntityManager\MetadataPool ' )
43
+ $ this ->metadataPoolMock = $ this ->getMockBuilder (\ Magento \Framework \EntityManager \MetadataPool::class )
44
44
->disableOriginalConstructor ()
45
45
->getMock ();
46
46
@@ -52,10 +52,10 @@ protected function setUp()
52
52
53
53
private function prepareAdapter ()
54
54
{
55
- $ this ->dbSelectMock = $ this ->getMockBuilder (' Magento\Framework\DB\Select ' )
55
+ $ this ->dbSelectMock = $ this ->getMockBuilder (\ Magento \Framework \DB \Select::class )
56
56
->disableOriginalConstructor ()
57
57
->getMock ();
58
- $ this ->connectionMock = $ this ->getMockBuilder (' Magento\Framework\DB\Adapter\AdapterInterface ' )
58
+ $ this ->connectionMock = $ this ->getMockBuilder (\ Magento \Framework \DB \Adapter \AdapterInterface::class )
59
59
->getMockForAbstractClass ();
60
60
$ this ->connectionMock ->expects ($ this ->any ())->method ('select ' )->willReturn ($ this ->dbSelectMock );
61
61
$ this ->resourceMock ->expects ($ this ->any ())
@@ -65,10 +65,10 @@ private function prepareAdapter()
65
65
66
66
private function prepareMetadata ()
67
67
{
68
- $ categoryLinkMetadata = $ this ->getMockBuilder (' Magento\Framework\EntityManager\EntityMetadataInterface ' )
68
+ $ categoryLinkMetadata = $ this ->getMockBuilder (\ Magento \Framework \EntityManager \EntityMetadataInterface::class )
69
69
->getMockForAbstractClass ();
70
70
$ categoryLinkMetadata ->expects ($ this ->any ())->method ('getEntityTable ' )->willReturn ('category_link_table ' );
71
- $ categoryEntityMetadata = $ this ->getMockBuilder (' Magento\Framework\EntityManager\EntityMetadataInterface ' )
71
+ $ categoryEntityMetadata = $ this ->getMockBuilder (\ Magento \Framework \EntityManager \EntityMetadataInterface::class )
72
72
->getMockForAbstractClass ();
73
73
$ categoryEntityMetadata ->expects ($ this ->any ())->method ('getEntityTable ' )->willReturn ('category_entity_table ' );
74
74
$ this ->metadataPoolMock ->expects ($ this ->any ())->method ('getMetadata ' )->willReturnMap (
@@ -83,7 +83,7 @@ public function testGetCategoryLinks()
83
83
{
84
84
$ this ->prepareAdapter ();
85
85
$ this ->prepareMetadata ();
86
- $ product = $ this ->getMockBuilder (' Magento\Catalog\Api\Data\ProductInterface ' )->getMockForAbstractClass ();
86
+ $ product = $ this ->getMockBuilder (\ Magento \Catalog \Api \Data \ProductInterface::class )->getMockForAbstractClass ();
87
87
$ product ->expects ($ this ->any ())->method ('getId ' )->willReturn (1 );
88
88
$ this ->connectionMock ->expects ($ this ->once ())->method ('fetchAll ' )->with ($ this ->dbSelectMock )->willReturn (
89
89
[
@@ -111,7 +111,7 @@ public function testSaveCategoryLinks($newCategoryLinks, $dbCategoryLinks, $affe
111
111
{
112
112
$ this ->prepareAdapter ();
113
113
$ this ->prepareMetadata ();
114
- $ product = $ this ->getMockBuilder (' Magento\Catalog\Api\Data\ProductInterface ' )->getMockForAbstractClass ();
114
+ $ product = $ this ->getMockBuilder (\ Magento \Catalog \Api \Data \ProductInterface::class )->getMockForAbstractClass ();
115
115
$ product ->expects ($ this ->any ())->method ('getId ' )->willReturn (1 );
116
116
$ this ->connectionMock ->expects ($ this ->once ())
117
117
->method ('fetchAll ' )
0 commit comments