public function ClassyTest::testClassyTheme in Drupal 8
Same name and namespace in other branches
- 9 core/modules/system/tests/src/Kernel/Render/ClassyTest.php \Drupal\Tests\system\Kernel\Render\ClassyTest::testClassyTheme()
Test the classy theme.
File
- core/
modules/ system/ tests/ src/ Kernel/ Render/ ClassyTest.php, line 39
Class
- ClassyTest
- Tests the Classy theme.
Namespace
Drupal\Tests\system\Kernel\RenderCode
public function testClassyTheme() {
\Drupal::messenger()
->addError('An error occurred');
\Drupal::messenger()
->addStatus('But then something nice happened');
$messages = [
'#type' => 'status_messages',
];
$this
->render($messages);
$this
->assertNoText('custom-test-messages-class', 'The custom class attribute value added in the status messages preprocess function is not displayed as page content.');
}