public function FlashBagTest::testPeekAll

File

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

Class

FlashBagTest
FlashBagTest

Namespace

Symfony\Component\HttpFoundation\Tests\Session\Flash

Code

public function testPeekAll() {
  $this->bag
    ->set('notice', 'Foo');
  $this->bag
    ->set('error', 'Bar');
  $this
    ->assertEquals(array(
    'notice' => array(
      'Foo',
    ),
    'error' => array(
      'Bar',
    ),
  ), $this->bag
    ->peekAll());
  $this
    ->assertTrue($this->bag
    ->has('notice'));
  $this
    ->assertTrue($this->bag
    ->has('error'));
  $this
    ->assertEquals(array(
    'notice' => array(
      'Foo',
    ),
    'error' => array(
      'Bar',
    ),
  ), $this->bag
    ->peekAll());
}