function LayoutDefaultTest::providerTestBuild

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

Class

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

Namespace

Drupal\Tests\Core\Layout

Code

public static 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.