function StyleGridTest::testGrid
Same name in other branches
- 8.9.x core/modules/views/tests/src/Kernel/Plugin/StyleGridTest.php \Drupal\Tests\views\Kernel\Plugin\StyleGridTest::testGrid()
- 10 core/modules/views/tests/src/Kernel/Plugin/StyleGridTest.php \Drupal\Tests\views\Kernel\Plugin\StyleGridTest::testGrid()
- 11.x core/modules/views/tests/src/Kernel/Plugin/StyleGridTest.php \Drupal\Tests\views\Kernel\Plugin\StyleGridTest::testGrid()
Tests the grid style.
File
-
core/
modules/ views/ tests/ src/ Kernel/ Plugin/ StyleGridTest.php, line 33
Class
- StyleGridTest
- Tests the grid style plugin.
Namespace
Drupal\Tests\views\Kernel\PluginCode
public function testGrid() {
$view = Views::getView('test_grid');
foreach ([
'horizontal',
'vertical',
] as $alignment) {
$this->assertGrid($view, $alignment, 5);
$this->assertGrid($view, $alignment, 4);
$this->assertGrid($view, $alignment, 3);
$this->assertGrid($view, $alignment, 2);
$this->assertGrid($view, $alignment, 1);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.