protected function BackendTestBase::regressionTest2136409 in Search API 8
Regression tests for handling of NULL filters.
See also
https://www.drupal.org/node/2136409
1 call to BackendTestBase::regressionTest2136409()
- BackendTestBase::regressionTests in tests/
src/ Kernel/ BackendTestBase.php - Executes regression tests for issues that were already fixed.
File
- tests/
src/ Kernel/ BackendTestBase.php, line 659
Class
- BackendTestBase
- Provides a base class for backend tests.
Namespace
Drupal\Tests\search_api\KernelCode
protected function regressionTest2136409() {
$query = $this
->buildSearch();
$query
->addCondition('category', NULL);
$results = $query
->execute();
$this
->assertResults([
3,
], $results, 'NULL filter');
$query = $this
->buildSearch();
$query
->addCondition('category', NULL, '<>');
$results = $query
->execute();
$this
->assertResults([
1,
2,
4,
5,
], $results, 'NOT NULL filter');
}