function SystemMessageTest::clearMessages
Clears the statically stored messages.
Parameters
null|string $type: (optional) The type of messages to clear. Defaults to NULL which causes all messages to be cleared.
Return value
$this
File
-
tests/
src/ Unit/ Integration/ RulesAction/ SystemMessageTest.php, line 97
Class
- SystemMessageTest
- @coversDefaultClass \Drupal\rules\Plugin\RulesAction\SystemMessage @group RulesAction
Namespace
Drupal\Tests\rules\Unit\Integration\RulesActionCode
protected function clearMessages($type = NULL) {
if (isset($type)) {
$this->messenger
->deleteByType($type);
}
else {
$this->messenger
->deleteAll();
}
return $this;
}