Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge branch 'flash-warning' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
e-belair committed Jul 15, 2013
2 parents 24237e3 + e11422f commit 4df4ccf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/Helper/FlashMessengerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -73,18 +74,21 @@ 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();

$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());
}

Expand All @@ -93,13 +97,15 @@ 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();

$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());
}

Expand Down

0 comments on commit 4df4ccf

Please sign in to comment.