From 3b30c2ca5bf7ad5c47b83d2cbb69def4d7841baf Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Sat, 16 Sep 2006 22:36:58 +0000 Subject: [PATCH] Renamed ConfigDef to ConfigSchema. (Required major internal restructuring but should not affect end-users) git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@424 48356398-32a2-884e-a903-53898d9a118a --- NEWS | 1 + library/HTMLPurifier.php | 4 +- library/HTMLPurifier/AttrDef/URI.php | 2 +- library/HTMLPurifier/AttrTransform/BdoDir.php | 4 +- library/HTMLPurifier/AttrTransform/ImgRequired.php | 4 +- library/HTMLPurifier/ChildDef.php | 2 +- library/HTMLPurifier/Config.php | 6 +-- .../{ConfigDef.php => ConfigSchema.php} | 12 +++--- library/HTMLPurifier/Encoder.php | 8 ++-- library/HTMLPurifier/Generator.php | 4 +- library/HTMLPurifier/Lexer.php | 2 +- library/HTMLPurifier/Strategy.php | 2 +- .../HTMLPurifier/Strategy/ValidateAttributes.php | 4 +- library/HTMLPurifier/URISchemeRegistry.php | 4 +- .../{ConfigDefTest.php => ConfigSchemaTest.php} | 44 +++++++++++----------- tests/HTMLPurifier/ConfigTest.php | 28 +++++++------- tests/index.php | 2 +- 17 files changed, 67 insertions(+), 66 deletions(-) rename library/HTMLPurifier/{ConfigDef.php => ConfigSchema.php} (97%) rename tests/HTMLPurifier/{ConfigDefTest.php => ConfigSchemaTest.php} (88%) diff --git a/NEWS b/NEWS index a0def4b0..f415071d 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier - Directive documentation generation using XSLT - Table child definition made more flexible, will fix up poorly ordered elements - XHTML generation can now be turned off, allowing things like
+- Renamed ConfigDef to ConfigSchema 1.0.1, released 2006-09-04 - Fixed slight bug in DOMLex attribute parsing diff --git a/library/HTMLPurifier.php b/library/HTMLPurifier.php index c2a3c6e8..eeb959e5 100644 --- a/library/HTMLPurifier.php +++ b/library/HTMLPurifier.php @@ -18,7 +18,7 @@ * However, most users will only need to interface with the HTMLPurifier * class, so this massive amount of infrastructure is usually concealed. * If you plan on working with the internals, be sure to include - * HTMLPurifier_ConfigDef and HTMLPurifier_Config. + * HTMLPurifier_ConfigSchema and HTMLPurifier_Config. */ /* @@ -42,7 +42,7 @@ // almost every class has an undocumented dependency to these, so make sure // they get included -require_once 'HTMLPurifier/ConfigDef.php'; +require_once 'HTMLPurifier/ConfigSchema.php'; require_once 'HTMLPurifier/Config.php'; require_once 'HTMLPurifier/Lexer.php'; diff --git a/library/HTMLPurifier/AttrDef/URI.php b/library/HTMLPurifier/AttrDef/URI.php index 0806771a..020ed44a 100644 --- a/library/HTMLPurifier/AttrDef/URI.php +++ b/library/HTMLPurifier/AttrDef/URI.php @@ -5,7 +5,7 @@ require_once 'HTMLPurifier/URIScheme.php'; require_once 'HTMLPurifier/URISchemeRegistry.php'; require_once 'HTMLPurifier/AttrDef/Host.php'; -HTMLPurifier_ConfigDef::define( +HTMLPurifier_ConfigSchema::define( 'URI', 'DefaultScheme', 'http', 'string', 'Defines through what scheme the output will be served, in order to '. 'select the proper object validator when no scheme information is present.' diff --git a/library/HTMLPurifier/AttrTransform/BdoDir.php b/library/HTMLPurifier/AttrTransform/BdoDir.php index 5f2f4fe2..a346bb18 100644 --- a/library/HTMLPurifier/AttrTransform/BdoDir.php +++ b/library/HTMLPurifier/AttrTransform/BdoDir.php @@ -4,13 +4,13 @@ require_once 'HTMLPurifier/AttrTransform.php'; // this MUST be placed in post, as it assumes that any value in dir is valid -HTMLPurifier_ConfigDef::define( +HTMLPurifier_ConfigSchema::define( 'Attr', 'DefaultTextDir', 'ltr', 'string', 'Defines the default text direction (ltr or rtl) of the document '. 'being parsed. This generally is the same as the value of the dir '. 'attribute in HTML, or ltr if that is not specified.' ); -HTMLPurifier_ConfigDef::defineAllowedValues( +HTMLPurifier_ConfigSchema::defineAllowedValues( 'Attr', 'DefaultTextDir', array( 'ltr', 'rtl' ) ); diff --git a/library/HTMLPurifier/AttrTransform/ImgRequired.php b/library/HTMLPurifier/AttrTransform/ImgRequired.php index bafe90b4..8bb6fc3f 100644 --- a/library/HTMLPurifier/AttrTransform/ImgRequired.php +++ b/library/HTMLPurifier/AttrTransform/ImgRequired.php @@ -4,7 +4,7 @@ require_once 'HTMLPurifier/AttrTransform.php'; // must be called POST validation -HTMLPurifier_ConfigDef::define( +HTMLPurifier_ConfigSchema::define( 'Attr', 'DefaultInvalidImage', '', 'string', 'This is the default image an img tag will be pointed to if it does '. 'not have a valid src attribute. In future versions, we may allow the '. @@ -12,7 +12,7 @@ HTMLPurifier_ConfigDef::define( 'not possible right now.' ); -HTMLPurifier_ConfigDef::define( +HTMLPurifier_ConfigSchema::define( 'Attr', 'DefaultInvalidImageAlt', 'Invalid image', 'string', 'This is the content of the alt tag of an invalid image if the user '. 'had not previously specified an alt attribute. It has no effect when the '. diff --git a/library/HTMLPurifier/ChildDef.php b/library/HTMLPurifier/ChildDef.php index 04c73c80..1147645f 100644 --- a/library/HTMLPurifier/ChildDef.php +++ b/library/HTMLPurifier/ChildDef.php @@ -5,7 +5,7 @@ // false = delete parent node and all children // array(...) = replace children nodes with these -HTMLPurifier_ConfigDef::define( +HTMLPurifier_ConfigSchema::define( 'Core', 'EscapeInvalidChildren', false, 'bool', 'When true, a child is found that is not allowed in the context of the '. 'parent element will be transformed into text as if it were ASCII. When '. diff --git a/library/HTMLPurifier/Config.php b/library/HTMLPurifier/Config.php index b7e0be04..706dffce 100644 --- a/library/HTMLPurifier/Config.php +++ b/library/HTMLPurifier/Config.php @@ -21,7 +21,7 @@ class HTMLPurifier_Config var $conf; /** - * Reference HTMLPurifier_ConfigDef for value checking + * Reference HTMLPurifier_ConfigSchema for value checking */ var $def; @@ -36,7 +36,7 @@ class HTMLPurifier_Config var $css_definition; /** - * @param $definition HTMLPurifier_ConfigDef that defines what directives + * @param $definition HTMLPurifier_ConfigSchema that defines what directives * are allowed. */ function HTMLPurifier_Config(&$definition) { @@ -49,7 +49,7 @@ class HTMLPurifier_Config * @return Default HTMLPurifier_Config object. */ function createDefault() { - $definition =& HTMLPurifier_ConfigDef::instance(); + $definition =& HTMLPurifier_ConfigSchema::instance(); $config = new HTMLPurifier_Config($definition); return $config; } diff --git a/library/HTMLPurifier/ConfigDef.php b/library/HTMLPurifier/ConfigSchema.php similarity index 97% rename from library/HTMLPurifier/ConfigDef.php rename to library/HTMLPurifier/ConfigSchema.php index 7994dc64..270fd8fd 100644 --- a/library/HTMLPurifier/ConfigDef.php +++ b/library/HTMLPurifier/ConfigSchema.php @@ -19,7 +19,7 @@ * might be implementation difficulties in ini files regarding order of * execution. */ -class HTMLPurifier_ConfigDef { +class HTMLPurifier_ConfigSchema { /** * Defaults of the directives and namespaces. @@ -73,7 +73,7 @@ class HTMLPurifier_ConfigDef { if ($prototype !== null) { $instance = $prototype; } elseif ($instance === null || $prototype === true) { - $instance = new HTMLPurifier_ConfigDef(); + $instance = new HTMLPurifier_ConfigSchema(); $instance->initialize(); } return $instance; @@ -96,7 +96,7 @@ class HTMLPurifier_ConfigDef { $namespace, $name, $default, $type, $description ) { - $def =& HTMLPurifier_ConfigDef::instance(); + $def =& HTMLPurifier_ConfigSchema::instance(); if (!isset($def->info[$namespace])) { trigger_error('Cannot define directive for undefined namespace', E_USER_ERROR); @@ -143,7 +143,7 @@ class HTMLPurifier_ConfigDef { * @param $description Description of the namespace */ function defineNamespace($namespace, $description) { - $def =& HTMLPurifier_ConfigDef::instance(); + $def =& HTMLPurifier_ConfigSchema::instance(); if (isset($def->info[$namespace])) { trigger_error('Cannot redefine namespace', E_USER_ERROR); return; @@ -170,7 +170,7 @@ class HTMLPurifier_ConfigDef { * @param $real Value aliased value will be converted into */ function defineValueAliases($namespace, $name, $aliases) { - $def =& HTMLPurifier_ConfigDef::instance(); + $def =& HTMLPurifier_ConfigSchema::instance(); if (!isset($def->info[$namespace][$name])) { trigger_error('Cannot set value alias for non-existant directive', E_USER_ERROR); @@ -200,7 +200,7 @@ class HTMLPurifier_ConfigDef { * @param $allowed_values Arraylist of allowed values */ function defineAllowedValues($namespace, $name, $allowed_values) { - $def =& HTMLPurifier_ConfigDef::instance(); + $def =& HTMLPurifier_ConfigSchema::instance(); if (!isset($def->info[$namespace][$name])) { trigger_error('Cannot define allowed values for undefined directive', E_USER_ERROR); diff --git a/library/HTMLPurifier/Encoder.php b/library/HTMLPurifier/Encoder.php index 7507f7c7..a2795297 100644 --- a/library/HTMLPurifier/Encoder.php +++ b/library/HTMLPurifier/Encoder.php @@ -2,7 +2,7 @@ require_once 'HTMLPurifier/EntityLookup.php'; -HTMLPurifier_ConfigDef::define( +HTMLPurifier_ConfigSchema::define( 'Core', 'Encoding', 'utf-8', 'istring', 'If for some reason you are unable to convert all webpages to UTF-8, '. 'you can use this directive as a stop-gap compatibility change to '. @@ -17,20 +17,20 @@ HTMLPurifier_ConfigDef::define( if ( !function_exists('iconv') ) { // only encodings with native PHP support - HTMLPurifier_ConfigDef::defineAllowedValues( + HTMLPurifier_ConfigSchema::defineAllowedValues( 'Core', 'Encoding', array( 'utf-8', 'iso-8859-1' ) ); - HTMLPurifier_ConfigDef::defineValueAliases( + HTMLPurifier_ConfigSchema::defineValueAliases( 'Core', 'Encoding', array( 'iso8859-1' => 'iso-8859-1' ) ); } -HTMLPurifier_ConfigDef::define( +HTMLPurifier_ConfigSchema::define( 'Test', 'ForceNoIconv', false, 'bool', 'When set to true, HTMLPurifier_Encoder will act as if iconv does not '. 'exist and use only pure PHP implementations.' diff --git a/library/HTMLPurifier/Generator.php b/library/HTMLPurifier/Generator.php index 015c5422..613ea965 100644 --- a/library/HTMLPurifier/Generator.php +++ b/library/HTMLPurifier/Generator.php @@ -4,7 +4,7 @@ require_once 'HTMLPurifier/Lexer.php'; -HTMLPurifier_ConfigDef::define( +HTMLPurifier_ConfigSchema::define( 'Core', 'CleanUTF8DuringGeneration', false, 'bool', 'When true, HTMLPurifier_Generator will also check all strings it '. 'escapes for UTF-8 well-formedness as a defense in depth measure. '. @@ -15,7 +15,7 @@ HTMLPurifier_ConfigDef::define( 'generateFromTokens.' ); -HTMLPurifier_ConfigDef::define( +HTMLPurifier_ConfigSchema::define( 'Core', 'XHTML', true, 'bool', 'Determines whether or not output is XHTML or not. When disabled, HTML '. 'Purifier goes into HTML 4.01 removes XHTML-specific markup constructs, '. diff --git a/library/HTMLPurifier/Lexer.php b/library/HTMLPurifier/Lexer.php index c23fcfab..e43c7b8d 100644 --- a/library/HTMLPurifier/Lexer.php +++ b/library/HTMLPurifier/Lexer.php @@ -4,7 +4,7 @@ require_once 'HTMLPurifier/Token.php'; require_once 'HTMLPurifier/Encoder.php'; require_once 'HTMLPurifier/EntityParser.php'; -HTMLPurifier_ConfigDef::define( +HTMLPurifier_ConfigSchema::define( 'Core', 'AcceptFullDocuments', true, 'bool', 'This parameter determines whether or not the filter should accept full '. 'HTML documents, not just HTML fragments. When on, it will '. diff --git a/library/HTMLPurifier/Strategy.php b/library/HTMLPurifier/Strategy.php index dcd683e4..5632eb86 100644 --- a/library/HTMLPurifier/Strategy.php +++ b/library/HTMLPurifier/Strategy.php @@ -8,7 +8,7 @@ * features, such as custom tags, custom parsing of text, etc. */ -HTMLPurifier_ConfigDef::define( +HTMLPurifier_ConfigSchema::define( 'Core', 'EscapeInvalidTags', false, 'bool', 'When true, invalid tags will be written back to the document as plain '. 'text. Otherwise, they are silently dropped.' diff --git a/library/HTMLPurifier/Strategy/ValidateAttributes.php b/library/HTMLPurifier/Strategy/ValidateAttributes.php index 5f73d1dc..3d3dec91 100644 --- a/library/HTMLPurifier/Strategy/ValidateAttributes.php +++ b/library/HTMLPurifier/Strategy/ValidateAttributes.php @@ -3,10 +3,10 @@ require_once 'HTMLPurifier/Strategy.php'; require_once 'HTMLPurifier/HTMLDefinition.php'; require_once 'HTMLPurifier/IDAccumulator.php'; -require_once 'HTMLPurifier/ConfigDef.php'; +require_once 'HTMLPurifier/ConfigSchema.php'; require_once 'HTMLPurifier/AttrContext.php'; -HTMLPurifier_ConfigDef::define( +HTMLPurifier_ConfigSchema::define( 'Attr', 'IDBlacklist', array(), 'list', 'Array of IDs not allowed in the document.'); diff --git a/library/HTMLPurifier/URISchemeRegistry.php b/library/HTMLPurifier/URISchemeRegistry.php index da01b360..693392bb 100644 --- a/library/HTMLPurifier/URISchemeRegistry.php +++ b/library/HTMLPurifier/URISchemeRegistry.php @@ -1,6 +1,6 @@ true, // "Hypertext Transfer Protocol", nuf' said 'https' => true, // HTTP over SSL (Secure Socket Layer) @@ -16,7 +16,7 @@ HTMLPurifier_ConfigDef::define( 'prevents XSS attacks from using pseudo-schemes like javascript or mocha.' ); -HTMLPurifier_ConfigDef::define( +HTMLPurifier_ConfigSchema::define( 'URI', 'OverrideAllowedSchemes', true, 'bool', 'If this is set to true (which it is by default), you can override '. '%URI.AllowedSchemes by simply registering a HTMLPurifier_URIScheme '. diff --git a/tests/HTMLPurifier/ConfigDefTest.php b/tests/HTMLPurifier/ConfigSchemaTest.php similarity index 88% rename from tests/HTMLPurifier/ConfigDefTest.php rename to tests/HTMLPurifier/ConfigSchemaTest.php index e574dc1d..fe04f053 100644 --- a/tests/HTMLPurifier/ConfigDefTest.php +++ b/tests/HTMLPurifier/ConfigSchemaTest.php @@ -1,8 +1,8 @@ old_copy = HTMLPurifier_ConfigDef::instance(); + $this->old_copy = HTMLPurifier_ConfigSchema::instance(); // put in our copy, and reassign to the REAL reference - $this->our_copy =& HTMLPurifier_ConfigDef::instance($our_copy); + $this->our_copy =& HTMLPurifier_ConfigSchema::instance($our_copy); } function tearDown() { // testing is done, restore the old copy - HTMLPurifier_ConfigDef::instance($this->old_copy); + HTMLPurifier_ConfigSchema::instance($this->old_copy); } function testNormal() { @@ -31,7 +31,7 @@ class HTMLPurifier_ConfigDefTest extends UnitTestCase // define a namespace $description = 'Configuration that is always available.'; - HTMLPurifier_ConfigDef::defineNamespace( + HTMLPurifier_ConfigSchema::defineNamespace( 'Core', $description ); $this->assertIdentical($this->our_copy->defaults, array( @@ -50,7 +50,7 @@ class HTMLPurifier_ConfigDefTest extends UnitTestCase // define a directive $description = 'This is a description of the directive.'; - HTMLPurifier_ConfigDef::define( + HTMLPurifier_ConfigSchema::define( 'Core', 'Name', 'default value', 'string', $description ); $line = __LINE__; @@ -71,7 +71,7 @@ class HTMLPurifier_ConfigDefTest extends UnitTestCase // define a directive in an undefined namespace - HTMLPurifier_ConfigDef::define( + HTMLPurifier_ConfigSchema::define( 'Extension', 'Name', false, 'bool', 'This is for an extension, but we have not defined its namespace!' ); @@ -83,7 +83,7 @@ class HTMLPurifier_ConfigDefTest extends UnitTestCase // redefine a value in a valid manner $description = 'Alternative configuration definition'; - HTMLPurifier_ConfigDef::define( + HTMLPurifier_ConfigSchema::define( 'Core', 'Name', 'default value', 'string', $description ); $line = __LINE__; @@ -98,7 +98,7 @@ class HTMLPurifier_ConfigDefTest extends UnitTestCase // redefine a directive in an invalid manner - HTMLPurifier_ConfigDef::define( + HTMLPurifier_ConfigSchema::define( 'Core', 'Name', 'different default', 'string', 'Inconsistent default or type, cannot redefine' ); @@ -109,7 +109,7 @@ class HTMLPurifier_ConfigDefTest extends UnitTestCase // make an enumeration - HTMLPurifier_ConfigDef::defineAllowedValues( + HTMLPurifier_ConfigSchema::defineAllowedValues( 'Core', 'Name', array( 'Real Value', 'Real Value 2' @@ -128,7 +128,7 @@ class HTMLPurifier_ConfigDefTest extends UnitTestCase // redefinition of enumeration is cumulative - HTMLPurifier_ConfigDef::defineAllowedValues( + HTMLPurifier_ConfigSchema::defineAllowedValues( 'Core', 'Name', array( 'Real Value 3', ) @@ -143,7 +143,7 @@ class HTMLPurifier_ConfigDefTest extends UnitTestCase // cannot define enumeration for undefined directive - HTMLPurifier_ConfigDef::defineAllowedValues( + HTMLPurifier_ConfigSchema::defineAllowedValues( 'Core', 'Foobar', array( 'Real Value 9', ) @@ -155,7 +155,7 @@ class HTMLPurifier_ConfigDefTest extends UnitTestCase // test defining value aliases for an enumerated value - HTMLPurifier_ConfigDef::defineValueAliases( + HTMLPurifier_ConfigSchema::defineValueAliases( 'Core', 'Name', array( 'Aliased Value' => 'Real Value' ) @@ -170,7 +170,7 @@ class HTMLPurifier_ConfigDefTest extends UnitTestCase // redefine should be cumulative - HTMLPurifier_ConfigDef::defineValueAliases( + HTMLPurifier_ConfigSchema::defineValueAliases( 'Core', 'Name', array( 'Aliased Value 2' => 'Real Value 2' ) @@ -185,7 +185,7 @@ class HTMLPurifier_ConfigDefTest extends UnitTestCase // cannot create alias to not-allowed value - HTMLPurifier_ConfigDef::defineValueAliases( + HTMLPurifier_ConfigSchema::defineValueAliases( 'Core', 'Name', array( 'Aliased Value 3' => 'Invalid Value' ) @@ -197,7 +197,7 @@ class HTMLPurifier_ConfigDefTest extends UnitTestCase // cannot create alias for already allowed value - HTMLPurifier_ConfigDef::defineValueAliases( + HTMLPurifier_ConfigSchema::defineValueAliases( 'Core', 'Name', array( 'Real Value' => 'Real Value 2' ) @@ -209,7 +209,7 @@ class HTMLPurifier_ConfigDefTest extends UnitTestCase // define a directive with an invalid type - HTMLPurifier_ConfigDef::define( + HTMLPurifier_ConfigSchema::define( 'Core', 'Foobar', false, 'omen', 'Omen is not a valid type, so we reject this.' ); @@ -221,7 +221,7 @@ class HTMLPurifier_ConfigDefTest extends UnitTestCase // define a directive with inconsistent type - HTMLPurifier_ConfigDef::define( + HTMLPurifier_ConfigSchema::define( 'Core', 'Foobaz', 10, 'string', 'If we say string, we should mean it, not integer 10.' ); @@ -232,7 +232,7 @@ class HTMLPurifier_ConfigDefTest extends UnitTestCase // define a directive with bad characters - HTMLPurifier_ConfigDef::define( + HTMLPurifier_ConfigSchema::define( 'Core', 'Core.Attr', 10, 'int', 'No periods! >:-(' ); @@ -242,7 +242,7 @@ class HTMLPurifier_ConfigDefTest extends UnitTestCase $this->swallowErrors(); // define a namespace with bad characters - HTMLPurifier_ConfigDef::defineNamespace( + HTMLPurifier_ConfigSchema::defineNamespace( 'Foobar&Gromit', $description ); diff --git a/tests/HTMLPurifier/ConfigTest.php b/tests/HTMLPurifier/ConfigTest.php index 00ef4c01..b5f606f4 100644 --- a/tests/HTMLPurifier/ConfigTest.php +++ b/tests/HTMLPurifier/ConfigTest.php @@ -8,41 +8,41 @@ class HTMLPurifier_ConfigTest extends UnitTestCase var $our_copy, $old_copy; function setUp() { - $our_copy = new HTMLPurifier_ConfigDef(); - $this->old_copy = HTMLPurifier_ConfigDef::instance(); - $this->our_copy =& HTMLPurifier_ConfigDef::instance($our_copy); + $our_copy = new HTMLPurifier_ConfigSchema(); + $this->old_copy = HTMLPurifier_ConfigSchema::instance(); + $this->our_copy =& HTMLPurifier_ConfigSchema::instance($our_copy); } function tearDown() { - HTMLPurifier_ConfigDef::instance($this->old_copy); + HTMLPurifier_ConfigSchema::instance($this->old_copy); } function test() { - HTMLPurifier_ConfigDef::defineNamespace('Core', 'Corestuff'); - HTMLPurifier_ConfigDef::defineNamespace('Attr', 'Attributes'); - HTMLPurifier_ConfigDef::defineNamespace('Extension', 'Extensible'); + HTMLPurifier_ConfigSchema::defineNamespace('Core', 'Corestuff'); + HTMLPurifier_ConfigSchema::defineNamespace('Attr', 'Attributes'); + HTMLPurifier_ConfigSchema::defineNamespace('Extension', 'Extensible'); - HTMLPurifier_ConfigDef::define( + HTMLPurifier_ConfigSchema::define( 'Core', 'Key', false, 'bool', 'A boolean directive.' ); - HTMLPurifier_ConfigDef::define( + HTMLPurifier_ConfigSchema::define( 'Attr', 'Key', 42, 'int', 'An integer directive.' ); - HTMLPurifier_ConfigDef::define( + HTMLPurifier_ConfigSchema::define( 'Extension', 'Pert', 'foo', 'string', 'A string directive.' ); - HTMLPurifier_ConfigDef::define( + HTMLPurifier_ConfigSchema::define( 'Core', 'Encoding', 'utf-8', 'istring', 'Case insensitivity!' ); - HTMLPurifier_ConfigDef::defineAllowedValues( + HTMLPurifier_ConfigSchema::defineAllowedValues( 'Extension', 'Pert', array('foo', 'moo') ); - HTMLPurifier_ConfigDef::defineValueAliases( + HTMLPurifier_ConfigSchema::defineValueAliases( 'Extension', 'Pert', array('cow' => 'moo') ); - HTMLPurifier_ConfigDef::defineAllowedValues( + HTMLPurifier_ConfigSchema::defineAllowedValues( 'Core', 'Encoding', array('utf-8', 'iso-8859-1') ); diff --git a/tests/index.php b/tests/index.php index beaf1831..880c5a87 100644 --- a/tests/index.php +++ b/tests/index.php @@ -40,7 +40,7 @@ require_once 'HTMLPurifier.php'; // define callable test files $test_files = array(); $test_files[] = 'ConfigTest.php'; -$test_files[] = 'ConfigDefTest.php'; +$test_files[] = 'ConfigSchemaTest.php'; $test_files[] = 'LexerTest.php'; $test_files[] = 'Lexer/DirectLexTest.php'; $test_files[] = 'TokenTest.php'; -- 2.11.4.GIT