public function testConvert6()
 {
     $x = new ConvertRomanNumber('MMMMCMXCIX');
     $this->assertEquals($x->getAsInteger(), 4999);
 }
 public static function convert($from, $to, $val)
 {
     if ($from != 'roman') {
         throw new \Exception("ep");
     }
     if (!in_array($to, array('arabic', 'decimal'))) {
         throw new \Exception("ep");
     }
     $x = new ConvertRomanNumber($val);
     return $x->getAsInteger();
 }