public function HeaderBagTest::testSetAssociativeArray

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php, line 71

Class

HeaderBagTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testSetAssociativeArray() {
  $bag = new HeaderBag();
  $bag
    ->set('foo', array(
    'bad-assoc-index' => 'value',
  ));
  $this
    ->assertSame('value', $bag
    ->get('foo'));
  $this
    ->assertEquals(array(
    'value',
  ), $bag
    ->get('foo', 'nope', false), 'assoc indices of multi-valued headers are ignored');
}