public function FlashBagTest::testCount

@covers Symfony\Component\HttpFoundation\Session\Flash\FlashBag::count

File

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

Class

FlashBagTest
FlashBagTest

Namespace

Symfony\Component\HttpFoundation\Tests\Session\Flash

Code

public function testCount() {
  $flashes = array(
    'hello' => 'world',
    'beep' => 'boop',
    'notice' => 'nope',
  );
  foreach ($flashes as $key => $val) {
    $this->bag
      ->set($key, $val);
  }
  $this
    ->assertEquals(count($flashes), count($this->bag));
}