You are here

public function WebformViewsRelationshipTestBase::testRelationship in Webform Views Integration 8.5

Test relationship.

@dataProvider providerRelationship()

Parameters

array $expected: Expected output from $this->renderView().

File

tests/src/Kernel/relationship/WebformViewsRelationshipTestBase.php, line 27

Class

WebformViewsRelationshipTestBase
Reasonable starting point for testing webform views relationships.

Namespace

Drupal\Tests\webform_views\Kernel\relationship

Code

public function testRelationship($expected) {
  $this->webform = $this
    ->createWebform($this->webform_elements);
  $this
    ->createWebformSubmissions($this->webform_submissions_data, $this->webform);
  $this->view = $this
    ->initView($this->webform, $this->view_handlers);
  $rendered_cells = $this
    ->renderView($this->view);
  $this
    ->assertSame($expected, $rendered_cells, 'Relationship works.');
}