You are here

public function LegacyMessengerTest::test_deleteMessagesByType in Service Container 7.2

Same name and namespace in other branches
  1. 8 tests/src/Messenger/LegacyMessengerTest.php \Drupal\Tests\service_container\Messenger\LegacyMessengerTest::test_deleteMessagesByType()
  2. 7 tests/src/Messenger/LegacyMessengerTest.php \Drupal\Tests\service_container\Messenger\LegacyMessengerTest::test_deleteMessagesByType()

@covers ::deleteMessagesByType()

File

tests/src/Messenger/LegacyMessengerTest.php, line 132
Contains \Drupal\Tests\service_container\Messenger\LegacyMessengerTest.

Class

LegacyMessengerTest
@coversDefaultClass \Drupal\service_container\Messenger\LegacyMessenger

Namespace

Drupal\Tests\service_container\Messenger

Code

public function test_deleteMessagesByType() {
  $this->drupal7
    ->shouldReceive('drupal_get_messages')
    ->once()
    ->with('warning', TRUE);
  $this
    ->assertSame($this->messenger_service, $this->messenger_service
    ->deleteMessagesByType('warning'));
}