You are here

public function StyleGridResponsiveTest::providerTestResponsiveGrid in Drupal 10

Data provider for testing various configurations.

Return value

array Array containing options for the style plugin and expected values.

File

core/modules/views/tests/src/Kernel/Plugin/StyleGridResponsiveTest.php, line 71

Class

StyleGridResponsiveTest
Tests the grid_responsive style plugin.

Namespace

Drupal\Tests\views\Kernel\Plugin

Code

public function providerTestResponsiveGrid() {
  return [
    'horizontal' => [
      'settings' => [
        'columns' => 7,
        'cell_min_width' => 123,
        'grid_gutter' => 13,
        'alignment' => 'horizontal',
      ],
      'expected' => [
        'columns' => 7,
        'cell_min_width' => 123,
        'grid_gutter' => 13,
        'alignment' => 'horizontal',
      ],
    ],
    'vertical' => [
      'settings' => [
        'columns' => 8,
        'cell_min_width' => 50,
        'grid_gutter' => 44,
        'alignment' => 'vertical',
      ],
      'expected' => [
        'columns' => 8,
        'cell_min_width' => 50,
        'grid_gutter' => 44,
        'alignment' => 'vertical',
      ],
    ],
    'default options' => [
      'settings' => [],
      'expected' => [
        'columns' => 4,
        'cell_min_width' => 100,
        'grid_gutter' => 10,
        'alignment' => 'horizontal',
      ],
    ],
  ];
}