File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
dev/tests/integration/testsuite/Magento/Search/Model/ResourceModel/Query Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Copyright © Magento, Inc. All rights reserved.
4+ * See COPYING.txt for license details.
5+ */
6+ declare (strict_types=1 );
7+
8+ namespace Magento \Search \Model \ResourceModel \Query ;
9+
10+ use Magento \Search \Model \ResourceModel \Query ;
11+ use Magento \Framework \ObjectManagerInterface ;
12+ use Magento \TestFramework \Helper \Bootstrap ;
13+ use PHPUnit \Framework \TestCase ;
14+ use Magento \Framework \DB \Adapter \Pdo \Mysql ;
15+
16+ class CollectionTest extends \PHPUnit \Framework \TestCase
17+ {
18+ /**
19+ * @var Query
20+ */
21+ private $ queryResource ;
22+
23+ /**
24+ * @inheritDoc
25+ */
26+ protected function setUp (): void
27+ {
28+ $ objectManager = Bootstrap::getObjectManager ();
29+ $ this ->queryResource = $ objectManager ->get (Query::class);
30+ }
31+
32+ public function testSearchQueryTableHasProperIndex ()
33+ {
34+ $ table = $ this ->queryResource ->getTable ('search_query ' );
35+ $ indexName = 'SEARCH_QUERY_STORE_ID_NUM_RESULTS_POPULARITY ' ;
36+ $ connection = $ this ->queryResource ->getConnection ();
37+ $ tableIndexes = $ connection ->getIndexList ($ table );
38+ $ this ->assertArrayHasKey ($ indexName , $ tableIndexes );
39+ }
40+ }
You can’t perform that action at this time.
0 commit comments