diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-11-15 12:50:33 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-11-15 12:50:33 -0500 |
commit | a675271ad71b7713d1b33bdba3c51b2b04813229 (patch) | |
tree | e54d8a95e16ca521193b9fd5a5eb071aa2910823 /tests/units/Core/Session/FlashMessageTest.php | |
parent | 2fc402f6733573627ad25394d109b9f848ef04f6 (diff) |
Rewrite of session management
Diffstat (limited to 'tests/units/Core/Session/FlashMessageTest.php')
-rw-r--r-- | tests/units/Core/Session/FlashMessageTest.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/units/Core/Session/FlashMessageTest.php b/tests/units/Core/Session/FlashMessageTest.php new file mode 100644 index 00000000..25361343 --- /dev/null +++ b/tests/units/Core/Session/FlashMessageTest.php @@ -0,0 +1,23 @@ +<?php + +require_once __DIR__.'/../../Base.php'; + +use Kanboard\Core\Session\FlashMessage; + +class FlashMessageTest extends Base +{ + public function testMessage() + { + $flash = new FlashMessage($this->container); + + $flash->success('my message'); + $this->assertEquals('my message', $flash->getMessage('success')); + $this->assertEmpty($flash->getMessage('success')); + + $flash->failure('my error message'); + $this->assertEquals('my error message', $flash->getMessage('failure')); + $this->assertEmpty($flash->getMessage('failure')); + + $this->assertEmpty($flash->getMessage('not found')); + } +} |