Skip to:
Content

bbPress.org

Changeset 6382


Ignore:
Timestamp:
03/17/2017 06:04:02 PM (5 years ago)
Author:
johnjamesjacoby
Message:

Mentions: Add tests for square and round brackets.

See #2963.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/common/formatting.php

    r6378 r6382  
    122122        $this->assertEquals( $at_name_at_start_final, bbp_make_clickable( $at_name_at_start ) );
    123123
     124        // mentions surrounded by square brackets
     125        $at_name_square_brackets       = sprintf( '[@%s] hello', $name );
     126        $at_name_square_brackets_final = sprintf( '[%s] hello', $link );
     127        $this->assertEquals( $at_name_square_brackets_final, bbp_make_clickable( $at_name_square_brackets ) );
     128
     129        // mentions surrounded by round brackets
     130        $at_name_round_brackets       = sprintf( '(@%s) hello', $name );
     131        $at_name_round_brackets_final = sprintf( '(%s) hello', $link );
     132        $this->assertEquals( $at_name_round_brackets_final, bbp_make_clickable( $at_name_round_brackets ) );
     133
    124134        // mention is all text, should be replaced
    125135        $at_name_is_text       = sprintf( '@%s', $name );
Note: See TracChangeset for help on using the changeset viewer.