Phalcon\Test\Unit\Flash\SessionTest::testClearMessagesFormSession PHP Method

testClearMessagesFormSession() public method

Tests clear method
Since: 2015-10-26
Author: Iván Guillén ([email protected])
    public function testClearMessagesFormSession()
    {
        $this->specify("The clear() method clear messages from session incorrectly", function () {
            $flash = $this->getFlash();
            ob_start();
            $flash->output();
            $flash->success('sample message');
            $flash->clear();
            $actual = ob_get_contents();
            ob_end_clean();
            $expected = '';
            expect($actual)->equals($expected);
        });
    }