public function AutoExpireFlashBagTest::testInitialize in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Tests/Session/Flash/AutoExpireFlashBagTest.php \Symfony\Component\HttpFoundation\Tests\Session\Flash\AutoExpireFlashBagTest::testInitialize()
File
- vendor/
symfony/ http-foundation/ Tests/ Session/ Flash/ AutoExpireFlashBagTest.php, line 47
Class
- AutoExpireFlashBagTest
- AutoExpireFlashBagTest.
Namespace
Symfony\Component\HttpFoundation\Tests\Session\FlashCode
public function testInitialize() {
$bag = new FlashBag();
$array = array(
'new' => array(
'notice' => array(
'A previous flash message',
),
),
);
$bag
->initialize($array);
$this
->assertEquals(array(
'A previous flash message',
), $bag
->peek('notice'));
$array = array(
'new' => array(
'notice' => array(
'Something else',
),
'error' => array(
'a',
),
),
);
$bag
->initialize($array);
$this
->assertEquals(array(
'Something else',
), $bag
->peek('notice'));
$this
->assertEquals(array(
'a',
), $bag
->peek('error'));
}