/**
  * it_should_replace_input_message_references_by_reference_html_link
  *
  * @param Lns\SocialFeed\Model\ReferenceInterface $reference1
  * @param Lns\SocialFeed\Model\ReferenceInterface $reference2
  */
 function it_should_replace_input_message_references_by_reference_html_link($reference1, $reference2)
 {
     $reference1->getStartIndice()->willReturn(5);
     $reference1->getEndIndice()->willReturn(10);
     $reference1->getType()->willReturn(ReferenceType::USER);
     $reference1->getData()->willReturn(array("screen_name" => "jdoe", "name" => "John Doe", "id" => 6844292, "id_str" => "6844292", "indices" => [5, 10]));
     $reference2->getStartIndice()->willReturn(12);
     $reference2->getEndIndice()->willReturn(17);
     $reference2->getType()->willReturn(ReferenceType::HASHTAG);
     $reference2->getData()->willReturn(array("text" => "test", "indices" => [12, 17]));
     $this->format('test @jdoe, #test bar', [$reference1, $reference2])->shouldReturn('test <a href="https://twitter.com/jdoe" target="_blank">@jdoe</a>, <a href="https://twitter.com/hashtag/test" target="_blank">#test</a> bar');
 }
 /**
  * it_should_replace_input_message_references_by_reference_html_link
  *
  * @param Lns\SocialFeed\Model\ReferenceInterface $reference1
  * @param Lns\SocialFeed\Model\ReferenceInterface $reference2
  */
 function it_should_replace_input_message_references_by_reference_html_link($reference1, $reference2)
 {
     $reference1->getStartIndice()->willReturn(5);
     $reference1->getEndIndice()->willReturn(10);
     $reference1->getType()->willReturn(ReferenceType::USER);
     $reference1->getData()->willReturn(array("id" => 6844292, "name" => "John Doe", "type" => "user", "offset" => 5, "length" => 5));
     $reference2->getStartIndice()->willReturn(12);
     $reference2->getEndIndice()->willReturn(17);
     $reference2->getType()->willReturn(ReferenceType::PAGE);
     $reference2->getData()->willReturn(array("id" => 32425, "name" => "test", "type" => "page", "offset" => 5, "length" => 5));
     $this->format('test @jdoe, @test bar', [$reference2, $reference1])->shouldReturn('test <a href="https://www.facebook.com/6844292" target="_blank">@jdoe</a>, <a href="https://www.facebook.com/32425" target="_blank">@test</a> bar');
     $this->format('foo #média bar', [])->shouldReturn('foo <a href="https://www.facebook.com/hashtag/média" target="_blank">#média</a> bar');
     $this->format('foo http://test.com bar', [])->shouldReturn('foo <a href="http://test.com" target="_blank">http://test.com</a> bar');
 }