public function testCanOverrideValues() { $a = new Tvnu\Config\Adapter\PhpArray('development', __DIR__ . '/fixtures/php-array'); $c = new Tvnu\Config\Config($a); $this->assertEquals('Foo Dev', $c->get('foo')); $this->assertEquals('Baz', $c->get('biz')); }
public function testCanGetFirstAndSecondLevelValues() { $a = new Tvnu\Config\Adapter\Database(static::$dbh, 'myconf', array('key', 'val')); $c = new Tvnu\Config\Config($a); $this->assertEquals('Bar', $c->get('foo')); $this->assertEquals('Baz', $c->get('biz')); $this->assertEquals('Hello World', $c->get('bar.foo')); $this->assertEquals('World Hello', $c->get('bar.biz')); }
/** * @expectedException Tvnu\Config\Exception\InvalidProperty */ public function testCanDetectMissingValue() { $a = new Tvnu\Config\Adapter\Ini('production', __DIR__ . '/fixtures/ini'); $c = new Tvnu\Config\Config($a); $c->get('value.dont.exist'); }