Index: tests/contrib/removexssTest.php =================================================================== --- tests/contrib/removexssTest.php (revision 8947) +++ tests/contrib/removexssTest.php (working copy) @@ -366,7 +366,45 @@ $this->assertEquals($expectedString, $actualString); } + /** + * @return array input strings and expected output strings to test + * + * @see processWithDataProvider + */ + public function processDataProvider() { + return array( + 'attackWithHexEncodedCharacter' => array( + 'click', + 'click', + ), + 'attackWithNestedHexEncodedCharacter' => array( + 'click', + 'click', + ), + 'attackWithUnicodeNumericalEncodedCharacter' => array( + 'click', + 'click', + ), + 'attackWithNestedUnicodeNumericalEncodedCharacter' => array( + 'click', + 'click', + ), + ); + } + /** + * @test + * + * @param string $input input value to test + * @param string $expected expected output value + * + * @dataProvider processDataProvider + */ + public function processWithDataProvider($input, $expected) { + $this->assertEquals( + $expected, + RemoveXSS::process($input) + ); + } } - ?> \ No newline at end of file