diff options
| author | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-23 15:14:02 +0300 |
|---|---|---|
| committer | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-23 15:14:02 +0300 |
| commit | 4d27ac74aff1ca47db53510bf07e9d083635175b (patch) | |
| tree | 894f7fe9f7c0afa7a590add770ca3c033c189221 /src/__tests__/VyOSElasticModernFulltextStorageEngineTestCase.php | |
| parent | e36bce7dee75eccf67ae4737452275a6a01d7bb9 (diff) | |
| download | phorge-elasticsearch-modern-4d27ac74aff1ca47db53510bf07e9d083635175b.tar.gz phorge-elasticsearch-modern-4d27ac74aff1ca47db53510bf07e9d083635175b.zip | |
fix: correct Phase-0 findings from promotion PR review (3 issues)
1. TestDouble signatures: indexExists() and getIndexStats() in
VyOSElasticModernFulltextStorageEngineTestDouble were missing the
nullable host parameter added in E7/E8, causing a PHP fatal on
'arc unit --everything'.
2. buildSpec() zero-query sort bug: the falsy check
(!$query->getParameter('query')) incorrectly treats the string '0'
as empty (PHP falsy), enabling date-sorted path for a real search
term. Changed to explicit null/empty-string checks to match the
existing must-clause guard on line 316.
All 22 unit tests now pass.
🤖 Generated by [robots](https://vyos.io)
Diffstat (limited to 'src/__tests__/VyOSElasticModernFulltextStorageEngineTestCase.php')
| -rw-r--r-- | src/__tests__/VyOSElasticModernFulltextStorageEngineTestCase.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/__tests__/VyOSElasticModernFulltextStorageEngineTestCase.php b/src/__tests__/VyOSElasticModernFulltextStorageEngineTestCase.php index 8a8b29c..0362f95 100644 --- a/src/__tests__/VyOSElasticModernFulltextStorageEngineTestCase.php +++ b/src/__tests__/VyOSElasticModernFulltextStorageEngineTestCase.php @@ -17,11 +17,11 @@ final class VyOSElasticModernFulltextStorageEngineTestDouble return array(); } - public function indexExists() { + public function indexExists(?VyOSElasticModernHost $host = null) { return false; } - public function getIndexStats() { + public function getIndexStats(?VyOSElasticModernHost $host = null) { return array(); } |
