Ejemplo n.º 1
0
 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'));
 }
Ejemplo n.º 2
0
 public function testClearData()
 {
     $storage = new File($this->sampleWrite);
     $cfg = new Config($storage);
     $cfg->clear();
     $contents = file_get_contents($this->sampleWrite);
     $this->assertTrue($contents === '{}');
 }