public static function isValid($data)
 {
     $conf = array('BASIC' => array('class' => 'FileBasedMessageGroup', 'namespace' => 8));
     /**
      * @var FileBasedMessageGroup $group
      */
     $group = MessageGroupBase::factory($conf);
     wfSuppressWarnings();
     $ffs = new IniFFS($group);
     $parsed = $ffs->readFromVariable($data);
     wfRestoreWarnings();
     return !!count($parsed['MESSAGES']);
 }
 public function testParsing()
 {
     $file = file_get_contents(__DIR__ . '/../data/IniFFSTest1.ini');
     /**
      * @var FileBasedMessageGroup $group
      */
     $group = MessageGroupBase::factory($this->groupConfiguration);
     $ffs = new IniFFS($group);
     $this->assertTrue(IniFFS::isValid($file));
     $parsed = $ffs->readFromVariable($file);
     $expected = array('hello' => 'Hello', 'world' => 'World!', 'all' => 'all = all', 'foo.bar' => 'bar', 'quote' => "We're having fun?");
     $expected = array('MESSAGES' => $expected, 'AUTHORS' => array('The king of very small kingdom'));
     $this->assertEquals($expected, $parsed);
 }