| | 343 | |
| | 344 | /** |
| | 345 | * anchor tag contains both a URL and some words. |
| | 346 | * |
| | 347 | * @ticket 23050 |
| | 348 | * |
| | 349 | */ |
| | 350 | function test_anchors_with_url_and_words() { |
| | 351 | $urls_before = array( |
| | 352 | 'Hey! <a href="http://wordpress.org">http://wordpress.org is awesome</a> if you have clicks to give!', |
| | 353 | 'Hey! <a href="http://wordpress.org/">http://wordpress.org/ is awesome</a> if you have clicks to give!', |
| | 354 | 'Hey! (<a href="http://wordpress.org">http://wordpress.org is awesome</a>) if you have clicks to give!', |
| | 355 | 'Hey! <<a href="http://wordpress.org">http://wordpress.org is awesome</a>> if you have clicks to give!', |
| | 356 | 'Hey! < <a href="http://wordpress.org">http://wordpress.org is awesome</a> > if you have clicks to give!', |
| | 357 | ); |
| | 358 | $urls_expected = array( |
| | 359 | 'Hey! <a href="http://wordpress.org">http://wordpress.org is awesome</a> if you have clicks to give!', |
| | 360 | 'Hey! <a href="http://wordpress.org/">http://wordpress.org/ is awesome</a> if you have clicks to give!', |
| | 361 | 'Hey! (<a href="http://wordpress.org">http://wordpress.org is awesome</a>) if you have clicks to give!', |
| | 362 | 'Hey! <<a href="http://wordpress.org">http://wordpress.org is awesome</a>> if you have clicks to give!', |
| | 363 | 'Hey! < <a href="http://wordpress.org">http://wordpress.org is awesome</a> > if you have clicks to give!', |
| | 364 | ); |
| | 365 | foreach ($urls_before as $key => $url) { |
| | 366 | $this->assertEquals( $urls_expected[$key], make_clickable( $url ) ); |
| | 367 | } |
| | 368 | } |