diff -u b/core/modules/views/src/Plugin/views/style/StylePluginBase.php b/core/modules/views/src/Plugin/views/style/StylePluginBase.php --- b/core/modules/views/src/Plugin/views/style/StylePluginBase.php +++ b/core/modules/views/src/Plugin/views/style/StylePluginBase.php @@ -215,7 +215,7 @@ if ($this->usesFields() && $this->view->field) { // Split the class on spaces and twig tokens. $classes = preg_split('/(\s|{{[^}]*}})/', $class, -1, PREG_SPLIT_DELIM_CAPTURE); - foreach($classes as &$token_class) { + foreach ($classes as &$token_class) { $token_class = strip_tags($this->tokenizeValue($token_class, $row_index)); // Convert any non-space elements to a nice clean class name. if (!empty($token_class) && $token_class != ' ') { diff -u b/core/modules/views/tests/src/Unit/Plugin/views/style/StylePluginBaseTest.php b/core/modules/views/tests/src/Unit/Plugin/views/style/StylePluginBaseTest.php --- b/core/modules/views/tests/src/Unit/Plugin/views/style/StylePluginBaseTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/views/style/StylePluginBaseTest.php @@ -16,13 +16,6 @@ use HandlerTestTrait; /** - * The mocked path renderer. - * - * @var \Drupal\Core\Render\RendererInterface|\PHPUnit_Framework_MockObject_MockObject - */ - protected $renderer; - - /** * @covers ::getRowClass * @dataProvider providerTestGetRowClass */ @@ -32,7 +25,7 @@ $row_plugin = $this->prophesize(RowPluginBase::class); $row_plugin->usesFields()->willReturn(TRUE); - + $field = $this->prophesize(FieldPluginBase::class); $this->executable->field['test'] = $field->reveal(); @@ -48,6 +41,11 @@ $this->assertEquals($expected_classes, $style_plugin->getRowClass(0)); } + /** + * Data provider for testGetRowClass(). + * + * @return array + */ public function providerTestGetRowClass() { $data = [];