public function testClearData() { $storage = new File($this->sampleWrite); $cfg = new Config($storage); $cfg->clear(); $contents = file_get_contents($this->sampleWrite); $this->assertTrue($contents === '{}'); }
public function testAssocArray() { $cfg = new Config(); $this->setExpectedException(InvalidArgumentException::class); $cfg->set('newkey', ['key' => 'value']); }
public function testAll() { $cfg = new Config($this->data); $this->assertSame($cfg->all(), ['fooo' => 'bar', 'foo' => ['other' => 'bar', 'bar' => ['something' => 'something', 'list' => ['VALUE:foo.bar.list[0]', 'VALUE:foo.bar.list[1]', 'VALUE:foo.bar.list[2]']]]]); }