public function testFile()
 {
     $target = __DIR__ . '/config/config.yml';
     $file = new FileLocator($target);
     $this->assertEquals($target, $file->getFile());
     $this->assertEquals('yml', $file->getExtension());
     $this->assertEquals(file_get_contents($target), $file->readFile());
 }
 /**
  * {@inheritdoc}
  */
 public function import(FileLocator $file)
 {
     $this->validateExtension($file->getExtension());
     $content = str_replace(array('false', 'FALSE'), array('"(bool)false"'), $file->readFile());
     $content = str_replace(array('true', 'TRUE'), array('"(bool)true"'), $content);
     $content = str_replace(array('null', 'NULL'), array('"(null)"'), $content);
     $configs = $this->normalize(array_filter(parse_ini_string($content, true)));
     return $this->normalize($configs);
 }
 /**
  * {@inheritdoc}
  */
 public function import(FileLocator $file)
 {
     $this->validateExtension($file->getExtension());
     return Yaml::parse($file->readFile());
 }