Ejemplo n.º 1
0
 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 ...");
     }
 }
Ejemplo n.º 2
0
 function testIncludeFile()
 {
     $my_included_file = new File("/test/include_test/include_me.php.inc");
     $this->assertEquals(StaticTestDumpRegistry::$my_var, 1, "La variabile e' stata modificata!!");
     $my_included_file->includeFile();
     $this->assertEquals(StaticTestDumpRegistry::$my_var, 2, "La variabile non e' stata incrementata!!");
     $my_included_file->includeFile();
     $this->assertEquals(StaticTestDumpRegistry::$my_var, 3, "La variabile non e' stata incrementata!!");
 }