Skip to content

Commit

Permalink
Issue #3438479 by jonathanchris, mkalkbrenner: Undefined array key in…
Browse files Browse the repository at this point in the history
… Index->loadItemsMultiple()
  • Loading branch information
mkalkbrenner committed Apr 10, 2024
1 parent ba4c278 commit 886fe02
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/src/Kernel/SearchApiSolrTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -764,31 +764,31 @@ protected function checkQueryConditions() {
$query = $this->buildSearch();
$query->addCondition('changed', ['2024-03-04', '2024-03-20'], 'BETWEEN');
$fq = $this->invokeMethod($backend, 'getFilterQueries', [$query, &$options]);
$this->assertEquals('ds_changed:[2024-03-04T00:00:00Z TO 2024-03-20T00:00:00Z]"', $fq[0]['query']);
$this->assertEquals('ds_changed:["2024-03-04T00:00:00Z" TO "2024-03-20T00:00:00Z"]', $fq[0]['query']);
$this->assertArrayNotHasKey(1, $fq);

$query = $this->buildSearch();
$query->addCondition('changed', ['*', '2024-03-20'], 'BETWEEN');
$fq = $this->invokeMethod($backend, 'getFilterQueries', [$query, &$options]);
$this->assertEquals('ds_changed:[* TO 2024-03-20T00:00:00Z]"', $fq[0]['query']);
$this->assertEquals('ds_changed:[* TO "2024-03-20T00:00:00Z"]', $fq[0]['query']);
$this->assertArrayNotHasKey(1, $fq);

$query = $this->buildSearch();
$query->addCondition('changed', ['2024-03-04', '*'], 'BETWEEN');
$fq = $this->invokeMethod($backend, 'getFilterQueries', [$query, &$options]);
$this->assertEquals('ds_changed:[2024-03-04T00:00:00Z TO *]"', $fq[0]['query']);
$this->assertEquals('ds_changed:["2024-03-04T00:00:00Z" TO *]', $fq[0]['query']);
$this->assertArrayNotHasKey(1, $fq);

$query = $this->buildSearch();
$query->addCondition('changed', [NULL, '2024-03-20'], 'BETWEEN');
$fq = $this->invokeMethod($backend, 'getFilterQueries', [$query, &$options]);
$this->assertEquals('ds_changed:[* TO 2024-03-20T00:00:00Z]"', $fq[0]['query']);
$this->assertEquals('ds_changed:[* TO "2024-03-20T00:00:00Z"]', $fq[0]['query']);
$this->assertArrayNotHasKey(1, $fq);

$query = $this->buildSearch();
$query->addCondition('changed', ['2024-03-04', NULL], 'BETWEEN');
$fq = $this->invokeMethod($backend, 'getFilterQueries', [$query, &$options]);
$this->assertEquals('ds_changed:[2024-03-04T00:00:00Z TO *]"', $fq[0]['query']);
$this->assertEquals('ds_changed:["2024-03-04T00:00:00Z" TO *]', $fq[0]['query']);
$this->assertArrayNotHasKey(1, $fq);
}

Expand Down

0 comments on commit 886fe02

Please sign in to comment.