Changeset 46564 for trunk/tests/phpunit/tests/formatting/MakeClickable.php
- Timestamp:
- 10/21/2019 08:39:16 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/MakeClickable.php
r42343 r46564 376 376 377 377 /** 378 * @ticket 30162 378 379 * @dataProvider data_script_and_style_tags 379 * @ticket 30162380 380 */ 381 381 public function test_dont_link_script_and_style_tags( $tag ) { … … 400 400 } 401 401 402 /** 403 * @ticket 48022 404 * @dataProvider data_add_rel_ugc_in_comments 405 */ 406 public function test_add_rel_ugc_in_comments( $content, $expected ) { 407 $comment_id = self::factory()->comment->create( 408 array( 409 'comment_content' => $content, 410 ) 411 ); 412 413 ob_start(); 414 comment_text( $comment_id ); 415 $comment_text = ob_get_clean(); 416 417 $this->assertContains( $expected, make_clickable( $comment_text ) ); 418 } 419 420 public function data_add_rel_ugc_in_comments() { 421 return array( 422 array( 423 'http://wordpress.org', 424 '<a href="http://wordpress.org" rel="nofollow ugc">http://wordpress.org</a>', 425 ), 426 array( 427 'www.wordpress.org', 428 '<p><a href="http://www.wordpress.org" rel="nofollow ugc">http://www.wordpress.org</a>', 429 ), 430 ); 431 } 432 402 433 }
Note: See TracChangeset
for help on using the changeset viewer.