protected function LatestRevisionFilterTest::assertNotInResultSet in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/tests/src/Kernel/Entity/LatestRevisionFilterTest.php \Drupal\Tests\views\Kernel\Entity\LatestRevisionFilterTest::assertNotInResultSet()
- 9 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);
}