- Timestamp:
- 10/09/2016 01:29:04 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment/getCommentAuthorEmailLink.php
r38398 r38763 41 41 unset( $GLOBALS['comment'] ); 42 42 43 $linktext = rand_str( 10 );44 $before = rand_str( 5 );45 $after = rand_str( 6 );43 $linktext = 'linktext'; 44 $before = 'before'; 45 $after = 'after'; 46 46 $comment = self::factory()->comment->create_and_get( array( 47 47 'comment_author_email' => $email = 'baz@example.org' … … 54 54 55 55 public function test_all_parameters_with_global_comment() { 56 $linktext = rand_str( 10 );57 $before = rand_str( 5 );58 $after = rand_str( 6 );56 $linktext = 'linktext'; 57 $before = 'before'; 58 $after = 'after'; 59 59 60 60 $expected = sprintf( '%1$s<a href="mailto:foo@example.org">%2$s</a>%3$s', $before, $linktext, $after ); … … 64 64 65 65 public function test_linktext() { 66 $expected = sprintf( '<a href="mailto:foo@example.org">%1$s</a>', $linktext = rand_str( 12 ));66 $expected = sprintf( '<a href="mailto:foo@example.org">%1$s</a>', $linktext = 'linktext' ); 67 67 68 68 $this->assertEquals( $expected, get_comment_author_email_link( $linktext ) ); … … 70 70 71 71 public function test_before() { 72 $expected = sprintf( '%1$s<a href="mailto:foo@example.org">foo@example.org</a>', $before = rand_str( 5 ));72 $expected = sprintf( '%1$s<a href="mailto:foo@example.org">foo@example.org</a>', $before = 'before' ); 73 73 74 74 $this->assertEquals( $expected, get_comment_author_email_link( '', $before ) ); … … 76 76 77 77 public function test_after() { 78 $expected = sprintf( '<a href="mailto:foo@example.org">foo@example.org</a>%1$s', $after = rand_str( 5 ));78 $expected = sprintf( '<a href="mailto:foo@example.org">foo@example.org</a>%1$s', $after = 'after' ); 79 79 80 80 $this->assertEquals( $expected, get_comment_author_email_link( '', '', $after ) );
Note: See TracChangeset
for help on using the changeset viewer.