NO URL CONTENT", false ), //no URLs array ( '
NO URL CONTENT
', false ), // ignore none link elements array ( 'ABC
LINK CONTENT
', "/relative.php" ), // single link array ( 'ABC
LINK CONTENT LINK
', "/relative.php" ), // multiple links array ( 'ABC
LINK CONTENT
', "http://example.com/Mr%20WordPress2" ), // escape link ); } /** * Validate the get_url_in_content function * @dataProvider get_input_output */ function test_get_url_in_content( $in_str, $exp_str ) { $this->assertEquals($exp_str, get_url_in_content( $in_str ) ); } }