Changeset 55563 for trunk/tests/phpunit/tests/formatting/linksAddTarget.php
- Timestamp:
- 03/19/2023 12:51:14 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/linksAddTarget.php
r55562 r55563 8 8 9 9 /** 10 * Validate the normalize_whitespace function10 * Tests the links_add_target() function. 11 11 * 12 12 * @dataProvider data_links_add_target 13 13 */ 14 public function test_links_add_target( $content, $target, $tags, $exp _str) {15 if ( true ===is_null( $target ) ) {16 $this->assertSame( $exp _str, links_add_target( $content ) );17 } elseif ( true ===is_null( $tags ) ) {18 $this->assertSame( $exp _str, links_add_target( $content, $target ) );14 public function test_links_add_target( $content, $target, $tags, $expected ) { 15 if ( is_null( $target ) ) { 16 $this->assertSame( $expected, links_add_target( $content ) ); 17 } elseif ( is_null( $tags ) ) { 18 $this->assertSame( $expected, links_add_target( $content, $target ) ); 19 19 } else { 20 $this->assertSame( $exp _str, links_add_target( $content, $target, $tags ) );20 $this->assertSame( $expected, links_add_target( $content, $target, $tags ) ); 21 21 } 22 22 } 23 23 24 24 /** 25 * Test Content DataProvider25 * Data provider. 26 26 * 27 * array ( input_txt, converted_output_txt) 27 * @return array { 28 * @type array { 29 * @type string $content String to search for links in. 30 * @type string $target The target to add to the links. 31 * @type string $tags An array of tags to apply to. 32 * @type string $expected Expected output. 33 * } 34 * } 28 35 */ 29 36 public function data_links_add_target() {
Note: See TracChangeset
for help on using the changeset viewer.