diff --git a/src/Helper/FlashMessenger.php b/src/Helper/FlashMessenger.php index 7e71fcca..d15b6adc 100644 --- a/src/Helper/FlashMessenger.php +++ b/src/Helper/FlashMessenger.php @@ -31,6 +31,7 @@ class FlashMessenger extends AbstractTranslatorHelper implements ServiceLocatorA PluginFlashMessenger::NAMESPACE_ERROR => 'error', PluginFlashMessenger::NAMESPACE_SUCCESS => 'success', PluginFlashMessenger::NAMESPACE_DEFAULT => 'default', + PluginFlashMessenger::NAMESPACE_WARNING => 'warning', ); /** diff --git a/test/Helper/FlashMessengerTest.php b/test/Helper/FlashMessengerTest.php index e742e3c8..3c2cf998 100644 --- a/test/Helper/FlashMessengerTest.php +++ b/test/Helper/FlashMessengerTest.php @@ -46,6 +46,7 @@ public function seedMessages() $helper->addMessage('bar'); $helper->addInfoMessage('bar-info'); $helper->addSuccessMessage('bar-success'); + $helper->addWarningMessage('bar-warning'); $helper->addErrorMessage('bar-error'); unset($helper); } @@ -73,6 +74,7 @@ public function testCanRetrieveMessages() $this->assertFalse($helper()->hasMessages()); $this->assertFalse($helper()->hasInfoMessages()); $this->assertFalse($helper()->hasSuccessMessages()); + $this->assertFalse($helper()->hasWarningMessages()); $this->assertFalse($helper()->hasErrorMessages()); $this->seedMessages(); @@ -80,11 +82,13 @@ public function testCanRetrieveMessages() $this->assertTrue(count($helper('default')) > 0); $this->assertTrue(count($helper('info')) > 0); $this->assertTrue(count($helper('success')) > 0); + $this->assertTrue(count($helper('warning')) > 0); $this->assertTrue(count($helper('error')) > 0); $this->assertTrue($this->plugin->hasMessages()); $this->assertTrue($this->plugin->hasInfoMessages()); $this->assertTrue($this->plugin->hasSuccessMessages()); + $this->assertTrue($this->plugin->hasWarningMessages()); $this->assertTrue($this->plugin->hasErrorMessages()); } @@ -93,6 +97,7 @@ public function testCanProxyAndRetrieveMessagesFromPluginController() $this->assertFalse($this->helper->hasMessages()); $this->assertFalse($this->helper->hasInfoMessages()); $this->assertFalse($this->helper->hasSuccessMessages()); + $this->assertFalse($this->helper->hasWarningMessages()); $this->assertFalse($this->helper->hasErrorMessages()); $this->seedMessages(); @@ -100,6 +105,7 @@ public function testCanProxyAndRetrieveMessagesFromPluginController() $this->assertTrue($this->helper->hasMessages()); $this->assertTrue($this->helper->hasInfoMessages()); $this->assertTrue($this->helper->hasSuccessMessages()); + $this->assertTrue($this->helper->hasWarningMessages()); $this->assertTrue($this->helper->hasErrorMessages()); }