File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed
dev/tests/integration/testsuite/Magento/Elasticsearch6/SearchAdapter Expand file tree Collapse file tree 1 file changed +49
-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 \Elasticsearch6 \SearchAdapter ;
9
+
10
+ use Magento \Elasticsearch \Elasticsearch5 \SearchAdapter \ConnectionManager ;
11
+ use Magento \TestFramework \Helper \Bootstrap ;
12
+
13
+ /**
14
+ * Test for \Magento\Elasticsearch\SearchAdapter\ConnectionManager class.
15
+ */
16
+ class ConnectionManagerTest extends \PHPUnit \Framework \TestCase
17
+ {
18
+ /**
19
+ * @var \Magento\Framework\ObjectManagerInterface
20
+ */
21
+ private $ objectManager ;
22
+
23
+ /**
24
+ * @var \Magento\Elasticsearch\SearchAdapter\ConnectionManager
25
+ */
26
+ private $ connectionManager ;
27
+
28
+ protected function setUp ()
29
+ {
30
+ $ this ->objectManager = Bootstrap::getObjectManager ();
31
+
32
+ $ this ->connectionManager = $ this ->objectManager ->create (ConnectionManager::class);
33
+ }
34
+
35
+ /**
36
+ * Test if 'elasticsearch6' search engine returned by connection manager.
37
+ *
38
+ * @magentoAppIsolation enabled
39
+ * @magentoConfigFixture default/catalog/search/engine elasticsearch6
40
+ */
41
+ public function testCorrectElasticsearchClient ()
42
+ {
43
+ $ connection = $ this ->connectionManager ->getConnection ();
44
+ $ this ->assertInstanceOf (
45
+ \Magento \Elasticsearch6 \Model \Client \Elasticsearch::class,
46
+ $ connection
47
+ );
48
+ }
49
+ }
You can’t perform that action at this time.
0 commit comments