@@ -70,10 +70,8 @@ class ProductTest extends \Magento\TestFramework\Indexer\TestCase
70
70
private $ logger ;
71
71
72
72
/**
73
- * @var \Magento\Framework\EntityManager\EntityMetadata
73
+ * @inheritdoc
74
74
*/
75
- private $ metadata ;
76
-
77
75
protected function setUp ()
78
76
{
79
77
$ this ->objectManager = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ();
@@ -85,11 +83,6 @@ protected function setUp()
85
83
['logger ' => $ this ->logger ]
86
84
);
87
85
88
- $ metadataPool = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ()->create (
89
- \Magento \Framework \EntityManager \MetadataPool::class
90
- );
91
- $ this ->metadata = $ metadataPool ->getMetadata (ProductInterface::class);
92
-
93
86
parent ::setUp ();
94
87
}
95
88
@@ -1327,15 +1320,14 @@ public function testNewProductPositionInCategory()
1327
1320
$ resourceConnection = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ()->get (
1328
1321
\Magento \Framework \App \ResourceConnection::class
1329
1322
);
1330
- $ linkField = $ this ->metadata ->getLinkField ();
1331
1323
$ categoryProductstableName = $ resourceConnection ->getTableName ('catalog_category_product ' );
1332
1324
$ productEntitiesTableName = $ resourceConnection ->getTableName ('catalog_product_entity ' );
1333
1325
$ select = $ resourceConnection ->getConnection ()
1334
1326
->select ()
1335
1327
->from (['category_products ' => $ categoryProductstableName ])
1336
1328
->join (
1337
1329
['product_entities ' => $ productEntitiesTableName ],
1338
- 'product_entities. ' . $ linkField . ' = category_products.product_id ' ,
1330
+ 'product_entities.entity_id = category_products.product_id ' ,
1339
1331
''
1340
1332
)
1341
1333
->where ('category_products.category_id = ? ' , $ categoryId )
0 commit comments