You are here

public function ParameterBagTest::testGetDeep in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-foundation/Tests/ParameterBagTest.php \Symfony\Component\HttpFoundation\Tests\ParameterBagTest::testGetDeep()

File

vendor/symfony/http-foundation/Tests/ParameterBagTest.php, line 109

Class

ParameterBagTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testGetDeep() {
  $bag = new ParameterBag(array(
    'foo' => array(
      'bar' => array(
        'moo' => 'boo',
      ),
    ),
  ));
  $this
    ->assertEquals(array(
    'moo' => 'boo',
  ), $bag
    ->get('foo[bar]', null, true));
  $this
    ->assertEquals('boo', $bag
    ->get('foo[bar][moo]', null, true));
  $this
    ->assertEquals('default', $bag
    ->get('foo[bar][foo]', 'default', true));
  $this
    ->assertEquals('default', $bag
    ->get('bar[moo][foo]', 'default', true));
}