/**
  * {@inheritdoc}
  */
 public function matches(Email $email)
 {
     if ($this->url_pattern) {
         return (bool) $email->getLinksMatching($this->url_pattern);
     } else {
         return (bool) $email->getLinks();
     }
 }
 /**
  * @param \Ingenerator\Mailhook\Email $email
  */
 function it_matches_email_with_any_link_when_pattern_is_empty($email)
 {
     $this->beConstructedWith(NULL);
     $email->getLinks()->willReturn(array('href' => 'http://foo.bar'));
     $this->subject->matches($email)->shouldBe(TRUE);
 }