public function testCycleDetection()
 {
     //setup
     /** @noinspection PhpInternalEntityUsedInspection */
     $graph = new ModuleDependencyGraph();
     $module1 = new CyclicDependingModule1Mock();
     $module2 = new CyclicDependingModule2Mock();
     $module3 = new CyclicDependingModule3Mock();
     $graph->addModule($module3);
     $graph->addModule($module2);
     $graph->addModule($module1);
     //act
     try {
         $graph->getSortedModuleList();
         $this->fail();
     } catch (CircularModuleLoadOrderDetectedException $e) {
         //pass
     }
 }