You are here

public function AutoExpireFlashBagTest::testGet in Zircon Profile 8

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

File

vendor/symfony/http-foundation/Tests/Session/Flash/AutoExpireFlashBagTest.php, line 124

Class

AutoExpireFlashBagTest
AutoExpireFlashBagTest.

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('non_existing', array(
    'default',
  )));
  $this
    ->assertEquals(array(
    'A previous flash message',
  ), $this->bag
    ->get('notice'));
  $this
    ->assertEquals(array(), $this->bag
    ->get('notice'));
}