public function testOneTable() { $config = new Config(new Db1Loader()); $this->assertNull($config->get("nosuchkey")); $this->assertNull($config->get("nosuchkey.foo")); $this->assertEquals(array("host" => "localhost", "debug" => 1), $config->get("development")); $this->assertEquals(array("host" => "example.com", "debug" => null), $config->get("production")); $this->assertSame("example.com", $config->get("production.host")); $this->assertSame(0, $config->get("production.debug", 0)); $this->assertNull($config->get("production.foo")); }
public function testSetWithNoKey() { $config = new Config(); $this->setExpectedException("SugiPHP\\Config\\Exception"); $config->set(null, 1); }