function StyleGridTest::testGrid

Same name in other branches
  1. 9 core/modules/views/tests/src/Kernel/Plugin/StyleGridTest.php \Drupal\Tests\views\Kernel\Plugin\StyleGridTest::testGrid()
  2. 8.9.x core/modules/views/tests/src/Kernel/Plugin/StyleGridTest.php \Drupal\Tests\views\Kernel\Plugin\StyleGridTest::testGrid()
  3. 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 35

Class

StyleGridTest
Tests the grid style plugin.

Namespace

Drupal\Tests\views\Kernel\Plugin

Code

public function testGrid() : void {
    $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.