/**
  * @see Cosma\SimpleStateMachine\AbstractGraphic::addTransition
  *
  * @expectedException \InvalidArgumentException
  */
 public function testAddTransition_EmptyTargetStateException()
 {
     $graphic = new Graphic();
     $graphic->addTransition('Cosma\\SimpleStateMachine\\Tests\\Example\\States\\EmptyLabelState', '', '', array());
 }
 /**
  * @see Cosma\SimpleStateMachine\StateMachine::draw
  */
 public function testGraph_SaveSvgToDisk()
 {
     @unlink('tests/coverage/_stateMachine.html');
     $file = @fopen('tests/coverage/_stateMachine.html', 'w+');
     $graphic = new Graphic('svg');
     if (!$graphic->isDOTInstalled()) {
         $this->markTestSkipped("dot command from graphviz is not installed. Please try 'sudo apt-get install graphviz'");
     }
     $stateMachine = new StateMachine();
     $startState = new Subst2();
     $stateMachine->setState($startState);
     $graphicStateMachine = $stateMachine->draw($graphic);
     @fwrite($file, $graphicStateMachine);
     @fclose($file);
 }