You are here

public function FlashBagTest::testGet in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-foundation/Tests/Session/Flash/FlashBagTest.php \Symfony\Component\HttpFoundation\Tests\Session\Flash\FlashBagTest::testGet()

File

vendor/symfony/http-foundation/Tests/Session/Flash/FlashBagTest.php, line 79

Class

FlashBagTest
FlashBagTest.

Namespace

Symfony\Component\HttpFoundation\Tests\Session\Flash

Code

public function testGet() {
  $this
    ->assertEquals(array(), $this->bag
    ->get('non_existing'));
  $this
    ->assertEquals(array(
    'default',
  ), $this->bag
    ->get('not_existing', array(
    'default',
  )));
  $this
    ->assertEquals(array(
    'A previous flash message',
  ), $this->bag
    ->get('notice'));
  $this
    ->assertEquals(array(), $this->bag
    ->get('notice'));
}