/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
dev/tests/integration/testsuite/Magento/OpenSearch/SearchAdapter/ConnectionManagerTest.php
50 строк
1 KB
engcom-Dash
31398: fix static failures
14 ноя 2024, 17:51
14 ноя 2024, 17:51
dc75032
Код
Авторство
О чём код?
<?php /** * Copyright 2022 Adobe * All Rights Reserved. */ declare(strict_types=1); namespace Magento\OpenSearch\SearchAdapter; use Magento\Elasticsearch\SearchAdapter\ConnectionManager; use Magento\Framework\ObjectManagerInterface; use Magento\OpenSearch\Model\SearchClient; use Magento\TestFramework\Helper\Bootstrap; use PHPUnit\Framework\TestCase; class ConnectionManagerTest extends TestCase { /** * @var ObjectManagerInterface */ private $objectManager; /** * @var ConnectionManager */ private $connectionManager; /** * @inheritDoc */ protected function setUp(): void { $this->objectManager = Bootstrap::getObjectManager(); // phpstan:ignore "Class Magento\Elasticsearch\SearchAdapter\ConnectionManager not found." $this->connectionManager = $this->objectManager->create(ConnectionManager::class); } /** * Test if 'opensearch' search engine returned by connection manager. * * @magentoAppIsolation enabled * @magentoConfigFixture default/catalog/search/engine opensearch */ public function testCorrectSearchClientOpenSearch() { $connection = $this->connectionManager->getConnection(); $this->assertInstanceOf(SearchClient::class, $connection); } }