Example #1
0
    function testReadFromString2()
    {
        $myString = <<<END_OF_STRING

proprieta_01 = Home
altra_prop = http://www.mbcraft.it
menu_style = small_font

ancora_props = Ancora proprieta
; Questo รจ un commento
ultima_props = L'ultima prop

END_OF_STRING;
        $props = IniPropertiesUtils::readFromString($myString, false);
        $this->assertTrue(count($props) == 5, "Il numero di properties non corrisponde!! : " . count($props));
        $this->assertEquals($props["menu_style"], "small_font", "La properties non corrisponde!!");
        $this->assertEquals($props["ancora_props"], "Ancora proprieta", "La properties non corrisponde!!");
        $this->assertEquals($props["ultima_props"], "L'ultima prop", "La properties non corrisponde!! : " . $props["ultima_props"]);
    }
Example #2
0
 /**
  * 
  * Removed all the listed entries from the properties storage file. If the file does not
  * exist it is created. If a key is not found nothing is removed.
  * 
  * @param array $entries the entries list to remove from the storage file.
  * 
  * @api
  */
 public function remove($entries)
 {
     $this->create();
     $this->checkStorageFile();
     IniPropertiesUtils::removeEntriesFromFile($this->storage_file, true, $entries);
 }