diff --git a/WordPress/Tests/Helpers/FormattingFunctionsHelper/IsFormattingFunctionUnitTest.php b/WordPress/Tests/Helpers/FormattingFunctionsHelper/IsFormattingFunctionUnitTest.php new file mode 100644 index 0000000000..e567d0f7c3 --- /dev/null +++ b/WordPress/Tests/Helpers/FormattingFunctionsHelper/IsFormattingFunctionUnitTest.php @@ -0,0 +1,64 @@ +assertSame( + $expectedResult, + FormattingFunctionsHelper::is_formatting_function( $functionName ) + ); + } + + /** + * Data provider. + * + * @see testIsFormattingFunction() + * + * @return array> + */ + public static function dataIsFormattingFunction() { + return array( + 'lowercase_name' => array( + 'functionName' => 'sprintf', + 'expectedResult' => true, + ), + 'mixedcase_name' => array( + 'functionName' => 'iMpLoDe', + 'expectedResult' => true, + ), + 'not_a_formatting_function' => array( + 'functionName' => 'printf', + 'expectedResult' => false, + ), + ); + } +}