Tests: Add a new test file missed in [33359].

git-svn-id: https://develop.svn.wordpress.org/trunk@33391 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2015-07-23 05:17:19 +00:00
parent f9ec35ddab
commit 2e74ecfc1c
1 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,37 @@
<?php
/**
* @group formatting
*/
class Tests_Formatting_WpReplaceInTags extends WP_UnitTestCase {
/**
* Check for expected behavior of new function wp_replace_in_html_tags().
*
* @dataProvider data_wp_replace_in_html_tags
*/
function test_wp_replace_in_html_tags( $input, $output ) {
return $this->assertEquals( $output, wp_replace_in_html_tags( $input, array( "\n" => " " ) ) );
}
function data_wp_replace_in_html_tags() {
return array(
array(
"Hello \n World",
"Hello \n World",
),
array(
"<Hello \n World>",
"<Hello World>",
),
array(
"<!-- Hello \n World -->",
"<!-- Hello World -->",
),
array(
"<!-- Hello <\n> World -->",
"<!-- Hello < > World -->",
),
);
}
}
?>