WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/09/2016 01:29:04 AM (4 years ago)
Author:
johnbillion
Message:

Build/Test Tools: Continue eliminating randomness in tests.

See [38762]
See #37371

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/comment/getCommentAuthorEmailLink.php

    r38398 r38763  
    4141        unset( $GLOBALS['comment'] );
    4242
    43         $linktext = rand_str( 10 );
    44         $before   = rand_str( 5 );
    45         $after    = rand_str( 6 );
     43        $linktext = 'linktext';
     44        $before   = 'before';
     45        $after    = 'after';
    4646        $comment  = self::factory()->comment->create_and_get( array(
    4747            'comment_author_email' => $email = 'baz@example.org'
     
    5454
    5555    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';
    5959
    6060        $expected = sprintf( '%1$s<a href="mailto:foo@example.org">%2$s</a>%3$s', $before, $linktext, $after );
     
    6464
    6565    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' );
    6767
    6868        $this->assertEquals( $expected, get_comment_author_email_link( $linktext ) );
     
    7070
    7171    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' );
    7373
    7474        $this->assertEquals( $expected, get_comment_author_email_link( '', $before ) );
     
    7676
    7777    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' );
    7979
    8080        $this->assertEquals( $expected, get_comment_author_email_link( '', '', $after ) );
Note: See TracChangeset for help on using the changeset viewer.