function TestMessenger::deleteByType

Overrides MessengerInterface::deleteByType

File

tests/src/Unit/TestMessenger.php, line 78

Class

TestMessenger
Mock class to replace the messenger service in unit tests.

Namespace

Drupal\Tests\rules\Unit

Code

public function deleteByType($type) {
    if (!empty($type) && isset($this->messages[$type])) {
        $this->messages[$type] = NULL;
    }
}