This commit is contained in:
2026-09-15 10:26:34 +08:00
commit ecf36afa56
10493 changed files with 1404888 additions and 0 deletions
@@ -0,0 +1,40 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);
namespace Magento\Search\Model\ResourceModel\Query;
use Magento\Search\Model\ResourceModel\Query;
use Magento\Framework\ObjectManagerInterface;
use Magento\TestFramework\Helper\Bootstrap;
use PHPUnit\Framework\TestCase;
use Magento\Framework\DB\Adapter\Pdo\Mysql;
class CollectionTest extends \PHPUnit\Framework\TestCase
{
/**
* @var Query
*/
private $queryResource;
/**
* @inheritDoc
*/
protected function setUp(): void
{
$objectManager = Bootstrap::getObjectManager();
$this->queryResource = $objectManager->get(Query::class);
}
public function testSearchQueryTableHasProperIndex()
{
$table = $this->queryResource->getTable('search_query');
$indexName = 'SEARCH_QUERY_STORE_ID_NUM_RESULTS_POPULARITY';
$connection = $this->queryResource->getConnection();
$tableIndexes = $connection->getIndexList($table);
$this->assertArrayHasKey($indexName, $tableIndexes);
}
}