public function LegacyMessengerTest::test_getMessagesByType in Service Container 7.2
Same name and namespace in other branches
- 8 tests/src/Messenger/LegacyMessengerTest.php \Drupal\Tests\service_container\Messenger\LegacyMessengerTest::test_getMessagesByType()
- 7 tests/src/Messenger/LegacyMessengerTest.php \Drupal\Tests\service_container\Messenger\LegacyMessengerTest::test_getMessagesByType()
@covers ::getMessagesByType() @dataProvider getMessagesDataProvider
File
- tests/
src/ Messenger/ LegacyMessengerTest.php, line 79 - Contains \Drupal\Tests\service_container\Messenger\LegacyMessengerTest.
Class
- LegacyMessengerTest
- @coversDefaultClass \Drupal\service_container\Messenger\LegacyMessenger
Namespace
Drupal\Tests\service_container\MessengerCode
public function test_getMessagesByType($type, $expected) {
$this->drupal7
->shouldReceive('drupal_get_messages')
->once()
->with($type, FALSE)
->andReturn($expected);
$result = isset($expected[$type]) ? $expected[$type] : array();
$this
->assertEquals($result, $this->messenger_service
->getMessagesByType($type));
}