'layout', 'library' => 'core/drupal', 'regions' => [ 'left' => [ 'label' => 'Left', ], 'right' => [ 'label' => 'Right', ], ], ]); $expected += [ '#settings' => [], '#layout' => $definition, '#theme' => 'layout', '#attached' => [ 'library' => [ 'core/drupal', ], ], ]; $layout = new LayoutDefault([], '', $definition); $this->assertSame($expected, $layout->build($regions)); } /** * Provides test data for ::testBuild(). */ 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; } }