Skip to content

Commit 6b796e3

Browse files
committed
MC-16239: Search result page contain 24k results
- fixed static tests
1 parent 8e2c61b commit 6b796e3

File tree

5 files changed

+19
-3
lines changed

5 files changed

+19
-3
lines changed

app/code/Magento/Elasticsearch/Elasticsearch5/Model/Client/Elasticsearch.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function ping()
9191
}
9292

9393
/**
94-
* Validate connection params
94+
* Validate connection params.
9595
*
9696
* @return bool
9797
*/
@@ -109,7 +109,9 @@ public function testConnection()
109109
private function buildConfig($options = [])
110110
{
111111
$host = preg_replace('/http[s]?:\/\//i', '', $options['hostname']);
112+
// @codingStandardsIgnoreStart
112113
$protocol = parse_url($options['hostname'], PHP_URL_SCHEME);
114+
// @codingStandardsIgnoreEnd
113115
if (!$protocol) {
114116
$protocol = 'http';
115117
}

app/code/Magento/Elasticsearch/Model/Client/Elasticsearch.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,17 @@ public function testConnection()
9696
}
9797

9898
/**
99+
* Build config.
100+
*
99101
* @param array $options
100102
* @return array
101103
*/
102104
private function buildConfig($options = [])
103105
{
104106
$host = preg_replace('/http[s]?:\/\//i', '', $options['hostname']);
107+
// @codingStandardsIgnoreStart
105108
$protocol = parse_url($options['hostname'], PHP_URL_SCHEME);
109+
// @codingStandardsIgnoreEnd
106110
if (!$protocol) {
107111
$protocol = 'http';
108112
}
@@ -202,9 +206,10 @@ public function indexExists($index)
202206
}
203207

204208
/**
209+
* Check if alias exists.
210+
*
205211
* @param string $alias
206212
* @param string $index
207-
*
208213
* @return bool
209214
*/
210215
public function existsAlias($alias, $index = '')
@@ -217,8 +222,9 @@ public function existsAlias($alias, $index = '')
217222
}
218223

219224
/**
220-
* @param string $alias
225+
* Get alias.
221226
*
227+
* @param string $alias
222228
* @return array
223229
*/
224230
public function getAlias($alias)

app/code/Magento/Elasticsearch/Test/Unit/Elasticsearch5/Model/Client/ElasticsearchTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
use Magento\Elasticsearch\Model\Client\Elasticsearch as ElasticsearchClient;
99
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
1010

11+
/**
12+
* Class ElasticsearchTest
13+
*/
1114
class ElasticsearchTest extends \PHPUnit\Framework\TestCase
1215
{
1316
/**

app/code/Magento/Elasticsearch6/Model/Client/Elasticsearch.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ public function testConnection()
104104
private function buildConfig($options = [])
105105
{
106106
$host = preg_replace('/http[s]?:\/\//i', '', $options['hostname']);
107+
// @codingStandardsIgnoreStart
107108
$protocol = parse_url($options['hostname'], PHP_URL_SCHEME);
109+
// @codingStandardsIgnoreEnd
108110
if (!$protocol) {
109111
$protocol = 'http';
110112
}

app/code/Magento/Elasticsearch6/Test/Unit/Model/Client/ElasticsearchTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
use Magento\Elasticsearch\Model\Client\Elasticsearch as ElasticsearchClient;
99
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
1010

11+
/**
12+
* Class ElasticsearchTest
13+
*/
1114
class ElasticsearchTest extends \PHPUnit\Framework\TestCase
1215
{
1316
/**

0 commit comments

Comments
 (0)