Example #1
0
 public function testGetByPartialKeyFromArray()
 {
     $config = new Config();
     $config->addFromArray(['cookie.lifetime_in_hours' => 48, 'database' => ['mysql.host' => '127.0.0.1', 'mysql.user' => 'bob'], 'deeply.nested.array.with.zero' => 0, 'deeply.nested.array.with.a.null' => null, 'deeply.nested.array.with.a.false' => false]);
     $actualValue = $config->get('deeply.nested.array');
     $expectedValue = ['with' => ['zero' => 0, 'a' => ['null' => null, 'false' => false]]];
     $this->assertSame($expectedValue, $actualValue);
 }