private function compareFiles(File $ref_lang_file, File $target_lang_file) { $this->target_lang_file_changed = false; $this->info("Comparing : " . $ref_lang_file->getPath() . " WITH " . $target_lang_file->getPath()); $ref_props = $ref_lang_file->includeFile(); $target_props = $target_lang_file->includeFile(); $target_props = $this->compareProps($ref_props, "", $target_props); if ($this->target_lang_file_changed) { $this->info("Saving changes into " . $target_lang_file->getPath() . " ..."); $this->savePHPArrayProperties($target_props, $target_lang_file); } else { $this->info("No changes to save, next file ..."); } }
function testFileWithDifficultName() { $f = new File("test/difficult_names/src/00 - Época\\ Porteño.txt"); $this->assertTrue($f->exists(), "Il file non è stato trovato!"); $this->assertEquals("00 - Época\\ Porteño.txt", $f->getFullName(), "Il nome del file non è letto correttamente!!"); $this->assertEquals("test/difficult_names/src/00 - Época\\ Porteño.txt", $f->getPath(), "Il percorso completo del file non corrisponde!"); $this->assertEquals("00 - Época\\ Porteño", $f->getName(), "Il nome senza estensione del file non corrisponde!"); }