/**
  * Execute the command.
  *
  * @return void
  */
 public function handle()
 {
     $views_root = new Dir("/resources/views/");
     $this->info("Checking resources path inside views ...");
     $views_root->visit($this);
     if (!$this->has_broken_paths) {
         $this->info("[[[ OK : All paths are consistent ]]]");
     }
 }
Exemple #2
0
 function testVisitDeep()
 {
     $visitor = new FolderVisitor(true);
     $d = new Dir("/test/test_dir/");
     $d->visit($visitor);
     $visited_folders = $visitor->getVisitedFolders();
     $this->assertEquals(6, count($visited_folders), "Il numero delle cartelle visitate non corrisponde!!");
     $this->assertEquals("/test/test_dir/", $visited_folders[0], "La cartella 0 non corrisponde!!");
     $this->assertEquals("/test/test_dir/content_dir/", $visited_folders[1], "La cartella 0 non corrisponde!!");
     $this->assertEquals("/test/test_dir/content_dir/another_dir/", $visited_folders[2], "La cartella 0 non corrisponde!!");
     $this->assertEquals("/test/test_dir/empty_dir/", $visited_folders[3], "La cartella 0 non corrisponde!!");
     $this->assertEquals("/test/test_dir/single_subdir/", $visited_folders[4], "La cartella 0 non corrisponde!!");
     $this->assertEquals("/test/test_dir/single_subdir/blablablax/", $visited_folders[5], "La cartella 0 non corrisponde!!");
 }