Esempio n. 1
0
 /**
  * reset
  *
  * @return  static
  */
 public function reset()
 {
     $this->state->clear();
     return $this;
 }
Esempio n. 2
0
 /**
  * Method to test loadString().
  *
  * @return void
  *
  * @covers Windwalker\Registry\Registry::loadString
  * @TODO   Implement testLoadString().
  */
 public function testLoadString()
 {
     $registry = new Registry();
     $this->assertEquals($registry->clear()->loadString(file_get_contents(__DIR__ . '/Stubs/flower.json'), 'json')->get('flower'), 'sakura');
     $this->assertEquals($registry->clear()->loadString(file_get_contents(__DIR__ . '/Stubs/flower.yml'), 'yaml')->get('flower'), 'sakura');
     $this->assertEquals($registry->clear()->loadString(file_get_contents(__DIR__ . '/Stubs/flower.ini'), 'ini')->get('flower'), 'sakura');
     $this->assertEquals($registry->clear()->loadString(file_get_contents(__DIR__ . '/Stubs/flower.xml'), 'xml')->get('flower'), 'sakura');
 }