public function ThemeTest::testRegionClass in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Theme/ThemeTest.php \Drupal\system\Tests\Theme\ThemeTest::testRegionClass()
Tests that region attributes can be manipulated via preprocess functions.
File
- core/
modules/ system/ src/ Tests/ Theme/ ThemeTest.php, line 288 - Contains \Drupal\system\Tests\Theme\ThemeTest.
Class
- ThemeTest
- Tests low-level theme functions.
Namespace
Drupal\system\Tests\ThemeCode
public function testRegionClass() {
\Drupal::service('module_installer')
->install(array(
'block',
'theme_region_test',
));
// Place a block.
$this
->drupalPlaceBlock('system_main_block');
$this
->drupalGet('');
$elements = $this
->cssSelect(".region-sidebar-first.new_class");
$this
->assertEqual(count($elements), 1, 'New class found.');
}