Skip to content

Commit e3018df

Browse files
committed
MAGETWO-71398: Attribute values on store view level not searchable
- Update integration test;
1 parent ffaab2b commit e3018df

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

dev/tests/integration/testsuite/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/DataProviderTest.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
3+
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento\CatalogSearch\Model\Indexer\Fulltext\Action;
77

8+
/**
9+
* @magentoDbIsolation disabled
10+
*/
811
class DataProviderTest extends \PHPUnit_Framework_TestCase
912
{
1013
/**
1114
* @magentoDataFixture Magento/CatalogSearch/_files/product_for_search.php
12-
* @magentoDbIsolation disabled
1315
*/
1416
public function testSearchProductByAttribute()
1517
{
1618
/** @var $objectManager \Magento\TestFramework\ObjectManager */
1719
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
1820

21+
/** @var \Magento\Framework\Indexer\IndexerInterface $indexer */
22+
$indexer = $objectManager->create(\Magento\Indexer\Model\Indexer::class);
23+
$indexer->load('catalogsearch_fulltext');
24+
$indexer->reindexAll();
25+
1926
$config = $objectManager->create(\Magento\Framework\Search\Request\Config::class);
2027
/** @var \Magento\Framework\Search\Request\Builder $requestBuilder */
2128
$requestBuilder = $objectManager->create(

dev/tests/integration/testsuite/Magento/CatalogSearch/_files/product_for_search.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
3+
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66

dev/tests/integration/testsuite/Magento/CatalogSearch/_files/product_for_search_rollback.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
3+
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66

dev/tests/integration/testsuite/Magento/CatalogSearch/_files/searchable_attribute.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
3+
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66

@@ -13,7 +13,7 @@
1313
'test_searchable_attribute',
1414
[
1515
'label' => 'Test-attribute',
16-
'global' => \Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_STORE,
16+
'is_global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
1717
'required' => 0,
1818
'user_defined' => 1,
1919
'searchable' => 1,
@@ -22,5 +22,10 @@
2222
'used_in_product_listing' => 1,
2323
'is_used_in_grid' => 1,
2424
'is_filterable_in_grid' => 1,
25+
'frontend_input' => 'text',
2526
]
2627
);
28+
29+
/** @var \Magento\Eav\Model\Config $eavConfig */
30+
$eavConfig = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Eav\Model\Config');
31+
$eavConfig->clear();

0 commit comments

Comments
 (0)