function LatestRevisionFilterTest::assertNotInResultSet
Same name in other branches
- 8.9.x core/modules/views/tests/src/Kernel/Entity/LatestRevisionFilterTest.php \Drupal\Tests\views\Kernel\Entity\LatestRevisionFilterTest::assertNotInResultSet()
- 10 core/modules/views/tests/src/Kernel/Entity/LatestRevisionFilterTest.php \Drupal\Tests\views\Kernel\Entity\LatestRevisionFilterTest::assertNotInResultSet()
- 11.x core/modules/views/tests/src/Kernel/Entity/LatestRevisionFilterTest.php \Drupal\Tests\views\Kernel\Entity\LatestRevisionFilterTest::assertNotInResultSet()
Asserts that a list of revision IDs are not in the result.
@internal
Parameters
\Drupal\views\ViewExecutable $view: An executed View.
array $not_expected_revision_ids: An array of revision IDs which should not be part of the result set.
1 call to LatestRevisionFilterTest::assertNotInResultSet()
- LatestRevisionFilterTest::testLatestRevisionFilter in core/
modules/ views/ tests/ src/ Kernel/ Entity/ LatestRevisionFilterTest.php - Tests the 'Latest revision' filter.
File
-
core/
modules/ views/ tests/ src/ Kernel/ Entity/ LatestRevisionFilterTest.php, line 132
Class
- LatestRevisionFilterTest
- Tests the 'Latest revision' filter.
Namespace
Drupal\Tests\views\Kernel\EntityCode
protected function assertNotInResultSet(ViewExecutable $view, array $not_expected_revision_ids) : void {
$found_revision_ids = array_filter($view->result, function ($row) use ($not_expected_revision_ids) {
return in_array($row->vid, $not_expected_revision_ids);
});
$this->assertEmpty($found_revision_ids);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.