Exemple #1
0
 public function getValidRecipient()
 {
     $recipient = new Recipient();
     $recipient->setId(1);
     $recipient->setPaperAddress($this->getValidPaperAddress());
     try {
         $recipient->verify();
     } catch (Element $e) {
         throw new Exception('Recipient is not valid');
     }
     return $recipient;
 }
Exemple #2
0
 public static function getValidRecipient($version)
 {
     $recipients = self::validContent();
     if (!isset($recipients[$version])) {
         throw new Exception('Recipient is not valid');
     }
     $recipient = new Recipient();
     $recipient->setId($recipients[$version][0]);
     $recipient->setPaperAddress($recipients[$version][1]);
     $recipient->setCategory($recipients[$version][2]);
     try {
         $recipient->verify();
     } catch (Element $e) {
         throw new Exception('Recipient is not valid');
     }
     return $recipient;
 }