ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Class SanitizerTest. More...
Public Member Functions | |
testLoadDefaultTags () | |
Make sure the initial tags are loaded. More... | |
testLoadDefaultAttributes () | |
Make sure the initial attributes are loaded. More... | |
testSetCustomTags () | |
Test the custom tag setters and getters. More... | |
testSetCustomAttributes () | |
Test the custom attribute setters and getters. More... | |
testSanitizeXMLDoc () | |
Test that malicious elements and attributes are removed from standard XML. More... | |
testSanitizeSVGDoc () | |
Test that malicious elements and attributes are removed from an SVG. More... | |
testBadXMLReturnsFalse () | |
Test that a badly formatted XML document returns false. More... | |
testSanitizeHrefs () | |
Make sure that hrefs get sanitized correctly. More... | |
testSanitizeHrefsNoXlinkNamespace () | |
Make sure that hrefs get sanitized correctly when the xlink namespace is omitted. More... | |
testSanitizeExternal () | |
Make sure that external references get sanitized correctly. More... | |
testSanitizeAndMinifiySVGDoc () | |
Test that minification of an SVG works. More... | |
testThatAriaAndDataAttributesAreAllowed () | |
Test that ARIA and Data Attributes are allowed. More... | |
testThatExternalUseElementsAreStripped () | |
Test that ARIA and Data Attributes are allowed. More... | |
testMinifiedOptions () | |
Test setXMLOptions and minifying works as expected. More... | |
useRecursionsAreDetected () | |
infiniteUseLoopsAreDetected () | |
testUseDOSattacksAreNullified () | |
Make sure that DOS attacks using the <use> element are detected. More... | |
testLargeUseDOSattacksAreNullified () | |
Make sure that DOS attacks using the <use> element are detected, especially when the SVG is extremely large. More... | |
Protected Member Functions | |
setUp () | |
Set up the test class. More... | |
tearDown () | |
Protected Attributes | |
$class | |
Class SanitizerTest.
Definition at line 12 of file SanitizerTest.php.
enshrined\svgSanitize\Tests\SanitizerTest::infiniteUseLoopsAreDetected | ( | ) |
Definition at line 245 of file SanitizerTest.php.
|
protected |
Set up the test class.
Definition at line 22 of file SanitizerTest.php.
|
protected |
Definition at line 27 of file SanitizerTest.php.
enshrined\svgSanitize\Tests\SanitizerTest::testBadXMLReturnsFalse | ( | ) |
Test that a badly formatted XML document returns false.
Definition at line 111 of file SanitizerTest.php.
enshrined\svgSanitize\Tests\SanitizerTest::testLargeUseDOSattacksAreNullified | ( | ) |
Make sure that DOS attacks using the <use> element are detected, especially when the SVG is extremely large.
Definition at line 276 of file SanitizerTest.php.
enshrined\svgSanitize\Tests\SanitizerTest::testLoadDefaultAttributes | ( | ) |
Make sure the initial attributes are loaded.
Definition at line 45 of file SanitizerTest.php.
References $attributes.
enshrined\svgSanitize\Tests\SanitizerTest::testLoadDefaultTags | ( | ) |
Make sure the initial tags are loaded.
Definition at line 35 of file SanitizerTest.php.
References $tags.
enshrined\svgSanitize\Tests\SanitizerTest::testMinifiedOptions | ( | ) |
Test setXMLOptions and minifying works as expected.
Definition at line 216 of file SanitizerTest.php.
References $output.
enshrined\svgSanitize\Tests\SanitizerTest::testSanitizeAndMinifiySVGDoc | ( | ) |
enshrined\svgSanitize\Tests\SanitizerTest::testSanitizeExternal | ( | ) |
Make sure that external references get sanitized correctly.
Definition at line 152 of file SanitizerTest.php.
enshrined\svgSanitize\Tests\SanitizerTest::testSanitizeHrefs | ( | ) |
enshrined\svgSanitize\Tests\SanitizerTest::testSanitizeHrefsNoXlinkNamespace | ( | ) |
Make sure that hrefs get sanitized correctly when the xlink namespace is omitted.
Definition at line 138 of file SanitizerTest.php.
enshrined\svgSanitize\Tests\SanitizerTest::testSanitizeSVGDoc | ( | ) |
Test that malicious elements and attributes are removed from an SVG.
Definition at line 97 of file SanitizerTest.php.
enshrined\svgSanitize\Tests\SanitizerTest::testSanitizeXMLDoc | ( | ) |
Test that malicious elements and attributes are removed from standard XML.
Definition at line 83 of file SanitizerTest.php.
enshrined\svgSanitize\Tests\SanitizerTest::testSetCustomAttributes | ( | ) |
Test the custom attribute setters and getters.
Definition at line 69 of file SanitizerTest.php.
References $attributes, and enshrined\svgSanitize\Tests\Fixtures\TestAllowedAttributes\getAttributes().
enshrined\svgSanitize\Tests\SanitizerTest::testSetCustomTags | ( | ) |
Test the custom tag setters and getters.
Definition at line 55 of file SanitizerTest.php.
References $tags, and enshrined\svgSanitize\Tests\Fixtures\TestAllowedTags\getTags().
enshrined\svgSanitize\Tests\SanitizerTest::testThatAriaAndDataAttributesAreAllowed | ( | ) |
enshrined\svgSanitize\Tests\SanitizerTest::testThatExternalUseElementsAreStripped | ( | ) |
enshrined\svgSanitize\Tests\SanitizerTest::testUseDOSattacksAreNullified | ( | ) |
Make sure that DOS attacks using the <use> element are detected.
Definition at line 260 of file SanitizerTest.php.
enshrined\svgSanitize\Tests\SanitizerTest::useRecursionsAreDetected | ( | ) |
Definition at line 230 of file SanitizerTest.php.
|
protected |
Definition at line 17 of file SanitizerTest.php.