/** * reset * * @return static */ public function reset() { $this->state->clear(); return $this; }
/** * 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'); }