function StyleGridResponsiveTest::providerTestResponsiveGrid
Same name in other branches
- 11.x core/modules/views/tests/src/Kernel/Plugin/StyleGridResponsiveTest.php \Drupal\Tests\views\Kernel\Plugin\StyleGridResponsiveTest::providerTestResponsiveGrid()
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 73
Class
- StyleGridResponsiveTest
- Tests the grid_responsive style plugin.
Namespace
Drupal\Tests\views\Kernel\PluginCode
public static function providerTestResponsiveGrid() {
return [
'horizontal' => [
'options' => [
'columns' => 7,
'cell_min_width' => 123,
'grid_gutter' => 13,
'alignment' => 'horizontal',
],
'expected' => [
'columns' => 7,
'cell_min_width' => 123,
'grid_gutter' => 13,
'alignment' => 'horizontal',
],
],
'vertical' => [
'options' => [
'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' => [
'options' => [],
'expected' => [
'columns' => 4,
'cell_min_width' => 100,
'grid_gutter' => 10,
'alignment' => 'horizontal',
],
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.