You are here

public function TaxonomyEntityIndexUuidArgumentTest::assertTermInResultsByUuid in Taxonomy Entity Index 8

Filter view by term UUID & assert nodes tagged with that term are returned.

Parameters

string $uuid: The UUID to filter the view by.

array $expectedResultSet: An array of results we expect to be /returned from the view when filtered by the given $uuid.

Return value

bool TRUE if the actual result node stubs are identical to the expected node stubs; FALSE otherwise.

1 call to TaxonomyEntityIndexUuidArgumentTest::assertTermInResultsByUuid()
TaxonomyEntityIndexUuidArgumentTest::testTermWithUuidFilter in tests/src/Functional/Views/TaxonomyEntityIndexUuidArgumentTest.php
Test that it is possible to filter a view by term UUID.

File

tests/src/Functional/Views/TaxonomyEntityIndexUuidArgumentTest.php, line 122

Class

TaxonomyEntityIndexUuidArgumentTest
Test whether it is possible to select terms using a UUID argument.

Namespace

Drupal\Tests\taxonomy_entity_index\Functional\Views

Code

public function assertTermInResultsByUuid($uuid, array $expectedResultSet) {

  // Initialize the view.
  $this->view
    ->destroy();
  $this->view
    ->initDisplay();

  // Execute the view query.
  $this
    ->executeView($this->view, [
    $uuid,
  ]);

  // Compare the result.
  return $this
    ->assertIdenticalResultsetHelper($this->view, $expectedResultSet, [
    'nid' => 'nid',
  ], 'assertIdentical');
}