public function AutoExpireFlashBagTest::testGet

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/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'));
}