You are here

protected function ViewResultAssertionTrait::assertNotIdenticalResultset in Drupal 8

Same name and namespace in other branches
  1. 9 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.'

Return value

bool TRUE if the assertion succeeded, or FALSE otherwise.

1 call to ViewResultAssertionTrait::assertNotIdenticalResultset()
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 57

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) {
  return $this
    ->assertIdenticalResultsetHelper($view, $expected_result, $column_map, 'assertNotIdentical', $message);
}