You are here

public function LayoutDefaultTest::providerTestBuild in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Layout/LayoutDefaultTest.php \Drupal\Tests\Core\Layout\LayoutDefaultTest::providerTestBuild()

Provides test data for ::testBuild().

File

core/tests/Drupal/Tests/Core/Layout/LayoutDefaultTest.php, line 52

Class

LayoutDefaultTest
@coversDefaultClass \Drupal\Core\Layout\LayoutDefault @group Layout

Namespace

Drupal\Tests\Core\Layout

Code

public function providerTestBuild() {
  $data = [];

  // Empty regions are not added.
  $data['right_only'] = [
    [
      'right' => [
        'foo' => 'bar',
      ],
    ],
    [
      'right' => [
        'foo' => 'bar',
      ],
    ],
  ];

  // Regions will be in the order defined by the layout.
  $data['switched_order'] = [
    [
      'right' => [
        'foo' => 'bar',
      ],
      'left' => [
        'foo' => 'baz',
      ],
    ],
    [
      'left' => [
        'foo' => 'baz',
      ],
      'right' => [
        'foo' => 'bar',
      ],
    ],
  ];
  return $data;
}