You are here

public function FieldsTest::fieldIsRenderedInDefaultRegionIfSelectedRegionDoesNotExist 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::fieldIsRenderedInDefaultRegionIfSelectedRegionDoesNotExist()

@test

File

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

Class

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

Namespace

Drupal\Tests\layout_plugin_views\Unit

Code

public function fieldIsRenderedInDefaultRegionIfSelectedRegionDoesNotExist() {
  $this
    ->initializeSubjectUnderTest([
    'assigned_regions' => [
      'somefield' => 'left',
      'some_other_field' => 'this_region_does_not_exist',
    ],
  ]);
  $result = $this->sut
    ->render(new ResultRow([]));
  $this
    ->assertRenderedRegions(TRUE, TRUE, FALSE, $result);
}