diff --git a/tests/phpunit/tests/functions/_cleanup_header_comment.php b/tests/phpunit/tests/functions/_cleanup_header_comment.php new file mode 100644 index 0000000000..0f1ceed3b0 --- /dev/null +++ b/tests/phpunit/tests/functions/_cleanup_header_comment.php @@ -0,0 +1,121 @@ +assertEquals( $expected, _cleanup_header_comment( $test_string ) ); + } + + /** + * Data provider for test_cleanup_header_comment. + * + * @return array[] Test parameters { + * @type string $test_string Test string. + * @type string $expected Expected return value. + * } + */ + public function data_cleanup_header_comment() { + return array( + // Set 0: A string. + array( + 'ffffffffffffff', + 'ffffffffffffff', + ), + // Set 1: Trim a string. + array( + ' ffffffffffffff ', + 'ffffffffffffff', + ), + // Set 2: Trim a full comment string. + array( + ' +dddlddfs +', + '