function ViewResultAssertionTrait::assertNotIdenticalResultset

Same name in other branches
  1. 9 core/modules/views/src/Tests/ViewResultAssertionTrait.php \Drupal\views\Tests\ViewResultAssertionTrait::assertNotIdenticalResultset()
  2. 8.9.x core/modules/views/src/Tests/ViewResultAssertionTrait.php \Drupal\views\Tests\ViewResultAssertionTrait::assertNotIdenticalResultset()
  3. 10 core/modules/views/src/Tests/ViewResultAssertionTrait.php \Drupal\views\Tests\ViewResultAssertionTrait::assertNotIdenticalResultset()

Verifies that a result set returned by a View differs from certain values.

Inverse of ViewsTestCase::assertIdenticalResultset().

Parameters

\Drupal\views\ViewExecutable $view: An executed View.

array $expected_result: An expected result set.

array $column_map: (optional) An associative array mapping the columns of the result set from the view (as keys) and the expected result set (as values).

string $message: (optional) A custom message to display with the assertion. Defaults to 'Non-identical result set.'

2 calls to ViewResultAssertionTrait::assertNotIdenticalResultset()
FilterCombineTest::testFilterCombineNoRealName in core/modules/views/tests/src/Kernel/Handler/FilterCombineTest.php
Tests the combine filter when no realName is used.
SortRandomTest::testRandomOrdering in core/modules/views/tests/src/Kernel/Handler/SortRandomTest.php
Tests random ordering of the result set.

File

core/modules/views/src/Tests/ViewResultAssertionTrait.php, line 52

Class

ViewResultAssertionTrait
Provides a class for assertions to check for the expected result of a View.

Namespace

Drupal\views\Tests

Code

protected function assertNotIdenticalResultset($view, $expected_result, $column_map = [], $message = NULL) : void {
    $this->assertIdenticalResultsetHelper($view, $expected_result, $column_map, 'assertNotIdentical', $message);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.