/**
  * @test
  * @dataProvider mailInputProvider
  */
 public function parseActualMailInput($mail, $expected)
 {
     $mails = new Kingboard_KillmailParser_Testmails();
     $actual = $this->object->parse($mail)->getDataArray();
     try {
         $this->assertTrue($mails->compareArrays($expected, $actual));
     } catch (UnexpectedValueException $e) {
         $this->fail($e->getMessage());
     }
 }
 /**
  * Parse a plain text killmail and return
  * the according Kingboard_Kill object
  *
  * @param string $mail
  * @return Kingboard_Kill
  */
 public static function parseTextMail($mail)
 {
     $parser = new Kingboard_KillmailParser_Parser();
     $parser->parse($mail);
     try {
         $validator = new Kingboard_KillmailParser_Validator();
         $validator->validateKillmailData($parser->getDataArray());
     } catch (Kingboard_KillmailHash_ErrorException $e) {
         throw new Kingboard_KillmailParser_KillmailErrorException($e->getMessage());
     }
     return $parser->getModel();
 }
 /**
  * @test
  * @dataProvider mailInputProvider
  */
 public function validateActualMailInput($mail, $expected)
 {
     $mails = new Kingboard_KillmailParser_Testmails();
     $parser = new Kingboard_KillmailParser_Parser();
     $actual = $parser->parse($mail)->getDataArray();
     $validator = new Kingboard_KillmailParser_Validator();
     $this->assertTrue($validator->validateKillmailData($actual));
 }