public function testClear() { $cfg = new Config($this->data); $this->assertSame($cfg->get('fooo'), $this->data['fooo']); $this->assertTrue($cfg->clear()); $this->assertFalse($cfg->clear()); $this->assertNull($cfg->get('foo')); }
public function testClearData() { $storage = new File($this->sampleWrite); $cfg = new Config($storage); $cfg->clear(); $contents = file_get_contents($this->sampleWrite); $this->assertTrue($contents === '{}'); }