Пример #1
0
 /**
  * @covers ::linkifyAll
  * @covers ::getHTML
  * @dataProvider providerLinkifyAll
  */
 public function testLinkifyAll($input, $output)
 {
     $this->object->setText($input);
     $this->assertEquals($this->object->linkifyAll()->getHTML(), $output);
 }
Пример #2
0
 /**
  * Substitute URLs, emails, usernames and hashtags with html <a> tags
  * 
  * @param string $text Source text
  * @return string Rendered HTML
  * @deprecated 1.1
  */
 public static function render($text = '')
 {
     $extractor = new Extractor($text);
     return $extractor->linkifyAll()->getHTML();
 }