Skip to content

Commit 0feb6a4

Browse files
committed
MC-31304: [ElasticSearch] Exception on catalog search result page
1 parent 259c03a commit 0feb6a4

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

dev/tests/integration/testsuite/Magento/Catalog/_files/category_attribute.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@
55
*/
66

77
/** @var \Magento\Catalog\Model\ResourceModel\Eav\Attribute $attribute */
8-
$attribute = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
9-
->create(\Magento\Catalog\Model\ResourceModel\Eav\Attribute::class);
8+
9+
use Magento\Catalog\Model\Category\Attribute;
10+
use Magento\TestFramework\Helper\Bootstrap;
11+
12+
$attribute = Bootstrap::getObjectManager()
13+
->create(Attribute::class);
1014
$attribute->setAttributeCode('test_attribute_code_666')
1115
->setEntityTypeId(3)
1216
->setIsGlobal(1)

dev/tests/integration/testsuite/Magento/Catalog/_files/category_attribute_rollback.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,20 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
/** @var \Magento\Framework\Registry $registry */
8-
$registry = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(\Magento\Framework\Registry::class);
7+
/** @var Registry $registry */
8+
9+
use Magento\Catalog\Model\Category\Attribute;
10+
use Magento\Framework\Registry;
11+
use Magento\TestFramework\Helper\Bootstrap;
12+
13+
$registry = Bootstrap::getObjectManager()->get(Registry::class);
914

1015
$registry->unregister('isSecureArea');
1116
$registry->register('isSecureArea', true);
1217

13-
/** @var \Magento\Catalog\Model\ResourceModel\Eav\Attribute $attribute */
14-
$attribute = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
15-
->create(\Magento\Catalog\Model\ResourceModel\Eav\Attribute::class);
18+
/** @var Attribute $attribute */
19+
$attribute = Bootstrap::getObjectManager()
20+
->create(Attribute::class);
1621

1722
$attribute->loadByCode(3, 'test_attribute_code_666');
1823

0 commit comments

Comments
 (0)