function LayoutDefaultTest::providerTestBuild

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Layout/LayoutDefaultTest.php \Drupal\Tests\Core\Layout\LayoutDefaultTest::providerTestBuild()
  2. 10 core/tests/Drupal/Tests/Core/Layout/LayoutDefaultTest.php \Drupal\Tests\Core\Layout\LayoutDefaultTest::providerTestBuild()
  3. 11.x 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 53

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.