示例#1
0
 function testOfSynchronisationNecessary()
 {
     $source = dirname(__FILE__) . "/package/fr/synchronisation.xml";
     $synchro = new PackagingSynchronisation($source);
     $this->assertEqual($synchro->revision(), "1672");
     $this->assertEqual($synchro->sourceRevision(), "1671");
     $this->assertEqual($synchro->sourceLang(), "en");
     $this->assertEqual($synchro->lastSynchroRevision(), "1475");
     $this->assertEqual($synchro->result(), "late");
 }
示例#2
0
 public function testOfSynchronisationNecessary()
 {
     $source = dirname(__FILE__) . "/package/fr/synchronisation.xml";
     $synchro = new PackagingSynchronisation($source);
     $this->assertEqual($synchro->revision(), "1672");
     $this->assertEqual($synchro->sourceRevision(), "1671");
     $this->assertEqual($synchro->sourceLang(), "en");
     $this->assertEqual($synchro->lastSynchroRevision(), "1475");
     $this->assertPattern("/style=\"color : red\"/", $synchro->result());
 }
 function sourceRevision()
 {
     $source_lang = $this->sourceLang();
     $source_file = str_replace("/" . $this->lang . "/", "/" . $source_lang . "/", $this->file);
     if (file_exists($source_file)) {
         $source = new PackagingSynchronisation($source_file, $source_lang);
         return $source->revision();
     }
     return false;
 }