public function FlashBagTest::testGet

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php, line 80

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'));
}