public function testMakeWithAttributes() { $string = Factory::anchor('Visit my website at http://ssdtutorials.com', ['target' => '_blank']); $expected = 'Visit my website at '; $expected .= '<a href="http://ssdtutorials.com"'; $expected .= ' target="_blank">ssdtutorials.com</a>'; $this->assertEquals($expected, $string); }
<?php require "../vendor/autoload.php"; use SSD\RegexKit\Factory; echo Factory::anchor('Visit documentation at http://github.com or for more info use http://google.com', ['target' => '_blank']);