protected function processGraph(Graph $graph, OutputInterface $output) { $algo = new SpaghettiCoupling($graph); $result = new Digraph(); $chosenStrategy = $this->connectionStrategy; $algo->setFilterPath(new $chosenStrategy($result)); $algo->generateCoupledClassGraph(); if ($this->showCycle) { $result = new Cycle($result); } return $result; }
/** * @expectedException \LogicException */ public function testStrategySetted() { $graph = new SpaghettiCoupling(new Digraph()); $graph->generateCoupledClassGraph(); }