function CToolsViewsEntityViewBlockTest::testNodes

Add test content for this class's tests.

1 call to CToolsViewsEntityViewBlockTest::testNodes()
CToolsViewsEntityViewBlockTest::setUp in modules/ctools_views/tests/src/Functional/CToolsViewsEntityViewBlockTest.php
Sets up the test.

File

modules/ctools_views/tests/src/Functional/CToolsViewsEntityViewBlockTest.php, line 551

Class

CToolsViewsEntityViewBlockTest
Tests the ctools_views block display plugin overriding entity View filters.

Namespace

Drupal\Tests\ctools_views\Functional

Code

protected function testNodes() : array {
  return [
    [
      'type' => 'ctools_views',
      'title' => 'Test entity 1',
      'uid' => 1,
      'field_ctools_views_text' => [
        'value' => 'text_1',
        'format' => 'plain_text',
      ],
      'field_ctools_views_tags' => [
        'target_id' => $this->terms[0]
          ->id(),
      ],
      'field_ctools_views_list' => [
        'value' => 'item1',
      ],
      'field_ctools_views_date' => [
        'value' => '1990-01-01',
      ],
    ],
    [
      'type' => 'ctools_views',
      'title' => 'Test entity 2',
      'uid' => 1,
      'field_ctools_views_text' => [
        'value' => 'text_2',
        'format' => 'plain_text',
      ],
      'field_ctools_views_tags' => [
        'target_id' => $this->terms[1]
          ->id(),
      ],
      'field_ctools_views_list' => [
        'value' => 'item2',
      ],
      'field_ctools_views_date' => [
        'value' => '2016-10-04',
      ],
    ],
    [
      'type' => 'ctools_views',
      'title' => 'Test entity 3',
      'uid' => 0,
      'field_ctools_views_text' => [
        'value' => 'text_1',
        'format' => 'plain_text',
      ],
      'field_ctools_views_tags' => [
        'target_id' => $this->terms[2]
          ->id(),
      ],
      'field_ctools_views_list' => [
        'value' => 'item3',
      ],
      'field_ctools_views_date' => [
        'value' => '2018-12-31',
      ],
    ],
  ];
}