You are here

protected function ViewResultAssertionTrait::assertIdenticalResultset in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views/src/Tests/ViewResultAssertionTrait.php \Drupal\views\Tests\ViewResultAssertionTrait::assertIdenticalResultset()
  2. 9 core/modules/views/src/Tests/ViewResultAssertionTrait.php \Drupal\views\Tests\ViewResultAssertionTrait::assertIdenticalResultset()

Verifies that a result set returned by a View matches expected values.

The comparison is done on the string representation of the columns of the column map, taking the order of the rows into account, but not the order of the columns.

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 'Identical result set.'

37 calls to ViewResultAssertionTrait::assertIdenticalResultset()
ArgumentNodeRevisionIdTest::testNodeRevisionRelationship in core/modules/node/tests/src/Kernel/Views/ArgumentNodeRevisionIdTest.php
Tests the node revision id argument via the node_vid handler.
ArgumentUidRevisionTest::testArgument in core/modules/node/tests/src/Kernel/Views/ArgumentUidRevisionTest.php
Tests the node_uid_revision argument.
CacheTest::testCacheContextIntegration in core/modules/views/tests/src/Kernel/Plugin/CacheTest.php
Tests the cache context integration for views result cache.
CacheTest::testTimeResultCachingWithPager in core/modules/views/tests/src/Kernel/Plugin/CacheTest.php
Tests result caching with a pager.
CommentFieldNameTest::testCommentFieldName in core/modules/comment/tests/src/Kernel/Views/CommentFieldNameTest.php
Tests comment field name.

... See full list

File

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

Class

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

Namespace

Drupal\views\Tests

Code

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