0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-12-22 16:31:53 +00:00
htmlpurifier/tests/test_files.php
Edward Z. Yang 929d932234 [3.1.0] Implement a few phpt, fix some autoload bugs
- Make our autoload handler polite, ensuring that any __autoload() 
functions get added
- Modify phpt calling code so that each phpt files gets its own 
test-case (this lets us run one phpt file at a time)
- Implement phpt for loading, which test varying loading methods of HTML 
Purifier
- Add --disable-phpt and --only-phpt flags
- More descriptive veto messages, also fix test count



git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1552 48356398-32a2-884e-a903-53898d9a118a
2008-02-16 05:40:59 +00:00

162 lines
7.6 KiB
PHP

<?php
if (!defined('HTMLPurifierTest')) exit;
// define callable test files (sorted alphabetically)
if (!$AC['only-phpt']) {
// HTML Purifier main library
$test_files[] = 'HTMLPurifier/AttrCollectionsTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/CSS/AlphaValueTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/CSS/BackgroundPositionTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/CSS/BackgroundTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/CSS/BorderTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/CSS/ColorTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/CSS/CompositeTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/CSS/FilterTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/CSS/FontFamilyTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/CSS/FontTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/CSS/LengthTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/CSS/ListStyleTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/CSS/MultipleTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/CSS/NumberTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/CSS/PercentageTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/CSS/TextDecorationTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/CSS/URITest.php';
$test_files[] = 'HTMLPurifier/AttrDef/CSSTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/EnumTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/HTML/ColorTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/HTML/IDTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/HTML/LengthTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/HTML/FrameTargetTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/HTML/MultiLengthTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/HTML/NmtokensTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/HTML/PixelsTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/HTML/LinkTypesTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/IntegerTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/LangTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/TextTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/URI/Email/SimpleCheckTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/URI/HostTest.php';
$test_files[] = 'HTMLPurifier/AttrDef/URI/IPv4Test.php';
$test_files[] = 'HTMLPurifier/AttrDef/URI/IPv6Test.php';
$test_files[] = 'HTMLPurifier/AttrDef/URITest.php';
$test_files[] = 'HTMLPurifier/AttrDefTest.php';
$test_files[] = 'HTMLPurifier/AttrTransformTest.php';
$test_files[] = 'HTMLPurifier/AttrTransform/BdoDirTest.php';
$test_files[] = 'HTMLPurifier/AttrTransform/BgColorTest.php';
$test_files[] = 'HTMLPurifier/AttrTransform/BoolToCSSTest.php';
$test_files[] = 'HTMLPurifier/AttrTransform/BorderTest.php';
$test_files[] = 'HTMLPurifier/AttrTransform/EnumToCSSTest.php';
$test_files[] = 'HTMLPurifier/AttrTransform/ImgRequiredTest.php';
$test_files[] = 'HTMLPurifier/AttrTransform/ImgSpaceTest.php';
$test_files[] = 'HTMLPurifier/AttrTransform/LangTest.php';
$test_files[] = 'HTMLPurifier/AttrTransform/LengthTest.php';
$test_files[] = 'HTMLPurifier/AttrTransform/NameTest.php';
$test_files[] = 'HTMLPurifier/AttrTypesTest.php';
$test_files[] = 'HTMLPurifier/AttrValidator_ErrorsTest.php';
$test_files[] = 'HTMLPurifier/ChildDef/ChameleonTest.php';
$test_files[] = 'HTMLPurifier/ChildDef/CustomTest.php';
$test_files[] = 'HTMLPurifier/ChildDef/OptionalTest.php';
$test_files[] = 'HTMLPurifier/ChildDef/RequiredTest.php';
$test_files[] = 'HTMLPurifier/ChildDef/StrictBlockquoteTest.php';
$test_files[] = 'HTMLPurifier/ChildDef/TableTest.php';
$test_files[] = 'HTMLPurifier/ConfigSchemaTest.php';
$test_files[] = 'HTMLPurifier/ConfigTest.php';
$test_files[] = 'HTMLPurifier/ContextTest.php';
$test_files[] = 'HTMLPurifier/DefinitionCacheFactoryTest.php';
$test_files[] = 'HTMLPurifier/DefinitionCacheTest.php';
$test_files[] = 'HTMLPurifier/DefinitionCache/Decorator/CleanupTest.php';
$test_files[] = 'HTMLPurifier/DefinitionCache/Decorator/MemoryTest.php';
$test_files[] = 'HTMLPurifier/DefinitionCache/DecoratorTest.php';
$test_files[] = 'HTMLPurifier/DefinitionCache/SerializerTest.php';
$test_files[] = 'HTMLPurifier/DefinitionTest.php';
$test_files[] = 'HTMLPurifier/DoctypeRegistryTest.php';
$test_files[] = 'HTMLPurifier/ElementDefTest.php';
$test_files[] = 'HTMLPurifier/ErrorCollectorTest.php';
$test_files[] = 'HTMLPurifier/EncoderTest.php';
$test_files[] = 'HTMLPurifier/EntityLookupTest.php';
$test_files[] = 'HTMLPurifier/EntityParserTest.php';
$test_files[] = 'HTMLPurifier/GeneratorTest.php';
$test_files[] = 'HTMLPurifier/HTMLDefinitionTest.php';
$test_files[] = 'HTMLPurifier/HTMLModuleManagerTest.php';
$test_files[] = 'HTMLPurifier/HTMLModuleTest.php';
$test_files[] = 'HTMLPurifier/HTMLModule/ObjectTest.php';
$test_files[] = 'HTMLPurifier/HTMLModule/RubyTest.php';
$test_files[] = 'HTMLPurifier/HTMLModule/ScriptingTest.php';
$test_files[] = 'HTMLPurifier/HTMLModule/TidyTest.php';
$test_files[] = 'HTMLPurifier/IDAccumulatorTest.php';
$test_files[] = 'HTMLPurifier/Injector/AutoParagraphTest.php';
$test_files[] = 'HTMLPurifier/Injector/LinkifyTest.php';
$test_files[] = 'HTMLPurifier/Injector/PurifierLinkifyTest.php';
$test_files[] = 'HTMLPurifier/LanguageFactoryTest.php';
$test_files[] = 'HTMLPurifier/LanguageTest.php';
$test_files[] = 'HTMLPurifier/Lexer/DirectLexTest.php';
$test_files[] = 'HTMLPurifier/Lexer/DirectLex_ErrorsTest.php';
$test_files[] = 'HTMLPurifier/LexerTest.php';
$test_files[] = 'HTMLPurifier/PercentEncoderTest.php';
$test_files[] = 'HTMLPurifier/Strategy/CompositeTest.php';
$test_files[] = 'HTMLPurifier/Strategy/CoreTest.php';
$test_files[] = 'HTMLPurifier/Strategy/FixNestingTest.php';
$test_files[] = 'HTMLPurifier/Strategy/FixNesting_ErrorsTest.php';
$test_files[] = 'HTMLPurifier/Strategy/MakeWellFormedTest.php';
$test_files[] = 'HTMLPurifier/Strategy/MakeWellFormed_ErrorsTest.php';
$test_files[] = 'HTMLPurifier/Strategy/MakeWellFormed_InjectorTest.php';
$test_files[] = 'HTMLPurifier/Strategy/RemoveForeignElementsTest.php';
$test_files[] = 'HTMLPurifier/Strategy/RemoveForeignElements_ErrorsTest.php';
$test_files[] = 'HTMLPurifier/Strategy/RemoveForeignElements_TidyTest.php';
$test_files[] = 'HTMLPurifier/Strategy/ValidateAttributesTest.php';
$test_files[] = 'HTMLPurifier/Strategy/ValidateAttributes_IDTest.php';
$test_files[] = 'HTMLPurifier/Strategy/ValidateAttributes_TidyTest.php';
$test_files[] = 'HTMLPurifier/TagTransformTest.php';
$test_files[] = 'HTMLPurifier/TokenFactoryTest.php';
$test_files[] = 'HTMLPurifier/TokenTest.php';
$test_files[] = 'HTMLPurifier/URIDefinitionTest.php';
$test_files[] = 'HTMLPurifier/URIFilter/DisableExternalTest.php';
$test_files[] = 'HTMLPurifier/URIFilter/DisableExternalResourcesTest.php';
$test_files[] = 'HTMLPurifier/URIFilter/HostBlacklistTest.php';
$test_files[] = 'HTMLPurifier/URIFilter/MakeAbsoluteTest.php';
$test_files[] = 'HTMLPurifier/URIParserTest.php';
$test_files[] = 'HTMLPurifier/URISchemeRegistryTest.php';
$test_files[] = 'HTMLPurifier/URISchemeTest.php';
$test_files[] = 'HTMLPurifier/URITest.php';
$test_files[] = 'HTMLPurifierTest.php';
if ($csstidy_location) {
$test_files[] = 'HTMLPurifier/Filter/ExtractStyleBlocksTest.php';
}
// ConfigDoc auxiliary library
// ... none yet
// FSTools auxiliary library
$test_files[] = 'FSTools/FileTest.php';
// ConfigSchema auxiliary library
$test_files[] = 'ConfigSchema/StringHashAdapterTest.php';
$test_files[] = 'ConfigSchema/StringHashReverseAdapterTest.php';
$test_files[] = 'ConfigSchema/StringHashParserTest.php';
$test_files[] = 'ConfigSchema/StringHashTest.php';
} // end if ($AC['only-phpt'])
// PHPT tests
if (!$AC['disable-phpt']) {
$phpt_dirs = array();
$phpt_dirs[] = 'HTMLPurifier/PHPT';
foreach ($phpt_dirs as $dir) {
$FS = new FSTools();
$phpt_files = $FS->globr($dir, '*.phpt');
foreach ($phpt_files as $file) {
$test_files[] = str_replace('\\', '/', $file);
}
}
}