コード例 #1
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     $this->initContainer();
     $this->cellFactory = new \Nonogram\Cell\Factory();
     $this->cellFactory->setContainer($this->container);
     $this->runRangeFactory = new \Nonogram\Solver\RunRange\RunRangeFactory();
     $this->runRangeFactory->setContainer($this->container);
 }
コード例 #2
0
ファイル: SolverJ54.php プロジェクト: Niehztog/php-nonogram
 /**
  * @param RunRange\RunRange|null $runRangeOverride option to inject a pre-defined state, only useful for unittests
  */
 private function initRunRanges(RunRange $runRangeOverride = null)
 {
     if (null !== $runRangeOverride) {
         $this->runRanges = $runRangeOverride;
         return;
     }
     $this->runRanges = $this->runRangeFactory->getForLabels($this->labels);
 }