Пример #1
0
 /**
  * Execute the command.
  *
  * @return void
  */
 public function handle()
 {
     $available_lang_dir = new Dir("/resources/lang/");
     if ($available_lang_dir->exists()) {
         $this->info("Available languages :");
         $this->info("");
         $folds = $available_lang_dir->listFolders();
         foreach ($folds as $f) {
             $this->info("[" . $f->getName() . "]");
         }
     } else {
         $this->warn("Localization directory " . $available_lang_dir->getPath() . " does not exists!!");
     }
     $hidden_lang_dir = new Dir("/storage/app/hidden_lang/");
     $this->info("");
     if ($hidden_lang_dir->exists()) {
         $this->info("Hidden languages :");
         $this->info("");
         $folds = $hidden_lang_dir->listFolders();
         foreach ($folds as $f) {
             $this->info("[" . $f->getName() . "]");
         }
     } else {
         $this->info("No hidden localizations found.");
     }
 }
Пример #2
0
 function testGetPathRelative()
 {
     $my_included_file = new Dir("/test/include_teiop/");
     //$rel_path = $my_included_file->getPath(new Dir(__DIR__));
     //$this->assertEquals("/io/include_teiop/",$rel_path,"Il percorso relativo non viene elaborato correttamente!! : ".$rel_path);
     $rel_path = $my_included_file->getPath(new Dir("/test/"));
     $this->assertEquals("/include_teiop/", $rel_path, "Il percorso relativo non viene elaborato correttamente!! : " . $rel_path);
     try {
         $this->assertEquals("/include_teiop/", $my_included_file->getPath(new Dir("/pluto/tests/io/include_test")), "Il percorso relativo non viene elaborato correttamente!!");
         $this->fail();
     } catch (IOException $ex) {
     }
 }