public function PiwikTestController::drupalSetMessageTest in Piwik Web Analytics 8
Tests setting messages and removing one before it is displayed.
Return value
string Empty string, we just test the setting of messages.
1 string reference to 'PiwikTestController::drupalSetMessageTest'
- piwik_test.routing.yml in tests/
modules/ piwik_test/ piwik_test.routing.yml - tests/modules/piwik_test/piwik_test.routing.yml
File
- tests/
modules/ piwik_test/ src/ Controller/ PiwikTestController.php, line 18
Class
- PiwikTestController
- Controller routines for system_test routes.
Namespace
Drupal\piwik_test\ControllerCode
public function drupalSetMessageTest() {
// Set some messages.
drupal_set_message('Example status message.', 'status');
drupal_set_message('Example warning message.', 'warning');
drupal_set_message('Example error message.', 'error');
drupal_set_message('Example error <em>message</em> with html tags and <a href="http://example.com/">link</a>.', 'error');
return [];
}