You are here

protected function FieldsTest::initializeSubjectUnderTest in Layout Plugin Views 8

Same name and namespace in other branches
  1. 8.2 tests/src/Unit/FieldsTest.php \Drupal\Tests\layout_plugin_views\Unit\FieldsTest::initializeSubjectUnderTest()
5 calls to FieldsTest::initializeSubjectUnderTest()
FieldsTest::emptyRowIsNotRendered in tests/src/Unit/FieldsTest.php
@test
FieldsTest::excludedFieldIsNotRendered in tests/src/Unit/FieldsTest.php
@test
FieldsTest::fieldIsRenderedInDefaultRegionIfSelectedRegionDoesNotExist in tests/src/Unit/FieldsTest.php
@test
FieldsTest::fieldIsRenderedInTheConfiguredRegion in tests/src/Unit/FieldsTest.php
@test
FieldsTest::setUp in tests/src/Unit/FieldsTest.php

File

tests/src/Unit/FieldsTest.php, line 297

Class

FieldsTest
@coversDefaultClass \Drupal\layout_plugin_views\Plugin\views\row\Fields @group Panels

Namespace

Drupal\Tests\layout_plugin_views\Unit

Code

protected function initializeSubjectUnderTest($options = [], $reset_view = FALSE, $add_fields = TRUE) {
  $this->sut = Fields::create($this->container, [], '', []);
  $display_handler = $this
    ->getMockBuilder(DisplayPluginBase::class)
    ->disableOriginalConstructor()
    ->getMock();
  $display_handler
    ->method('getFieldLabels')
    ->willReturn($this
    ->fieldLabels());
  $this->sut
    ->init($this
    ->getMockedView($reset_view, $add_fields), $display_handler, $options);
}