Ejemplo n.º 1
0
 function configurePathFinder(PathFinder $finder)
 {
     if ($this->pathfinderAlgorithm) {
         $finder->setAlgorithm($this->pathfinderAlgorithm);
     }
     if ($this->pathfinderMaxDepth) {
         $finder->setMaxDepth($this->pathfinderMaxDepth);
     }
 }
Ejemplo n.º 2
0
 function testPathFinderMaxDepthAndAlgorithm()
 {
     $configuration = new Configuration(array('pathfinder_maxdepth' => 5, 'pathfinder_algorithm' => PathFinderImpl::AlgoAllSimple));
     $finder = new PathFinder();
     $configuration->configurePathFinder($finder);
     $expect = new PathFinder();
     $expect->setMaxDepth(5);
     $expect->setAlgorithm(PathFinderImpl::AlgoAllSimple);
     $this->assertEquals($expect, $finder);
 }