From 793676c677107f2a47a60f4cdd0cc6e8abcfb81a Mon Sep 17 00:00:00 2001 From: xemlock Date: Thu, 8 Feb 2018 10:28:26 +0100 Subject: [PATCH] Make HTML5Config::create() default arguments the same as Config::create() --- library/HTMLPurifier/HTML5Config.php | 4 +--- tests/HTMLPurifier/AttrDef/HTML/Bool2Test.php | 2 +- tests/HTMLPurifier/HTML5ConfigTest.php | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/library/HTMLPurifier/HTML5Config.php b/library/HTMLPurifier/HTML5Config.php index c518b83..db9a1a9 100644 --- a/library/HTMLPurifier/HTML5Config.php +++ b/library/HTMLPurifier/HTML5Config.php @@ -7,7 +7,7 @@ class HTMLPurifier_HTML5Config * @param HTMLPurifier_ConfigSchema $schema * @return HTMLPurifier_Config */ - public static function create($config = null, HTMLPurifier_ConfigSchema $schema = null) + public static function create($config, HTMLPurifier_ConfigSchema $schema = null) { if (!$schema instanceof HTMLPurifier_ConfigSchema) { $schema = HTMLPurifier_ConfigSchema::instance(); @@ -53,5 +53,3 @@ public static function createDefault() return $config; } } - -// vim: et sw=4 sts=4 diff --git a/tests/HTMLPurifier/AttrDef/HTML/Bool2Test.php b/tests/HTMLPurifier/AttrDef/HTML/Bool2Test.php index fac18bf..ea6bc0a 100644 --- a/tests/HTMLPurifier/AttrDef/HTML/Bool2Test.php +++ b/tests/HTMLPurifier/AttrDef/HTML/Bool2Test.php @@ -6,7 +6,7 @@ class HTMLPurifier_AttrDef_HTML_Bool2Test extends PHPUnit_Framework_TestCase public function setUp() { - $this->config = HTMLPurifier_HTML5Config::create(); + $this->config = HTMLPurifier_HTML5Config::createDefault(); $this->context = new HTMLPurifier_Context(); } diff --git a/tests/HTMLPurifier/HTML5ConfigTest.php b/tests/HTMLPurifier/HTML5ConfigTest.php index 6735a14..fda7744 100644 --- a/tests/HTMLPurifier/HTML5ConfigTest.php +++ b/tests/HTMLPurifier/HTML5ConfigTest.php @@ -4,7 +4,7 @@ class HTMLPurifier_HTML5ConfigTest extends PHPUnit_Framework_TestCase { public function testCreate() { - $config = HTMLPurifier_HTML5Config::create(); + $config = HTMLPurifier_HTML5Config::create(null); $this->assertInstanceOf('HTMLPurifier_Config', $config); $config2 = HTMLPurifier_HTML5Config::create($config); @@ -16,7 +16,7 @@ public function testCreate() $this->assertInstanceOf('HTMLPurifier_Config', $config3); $this->assertEquals('iso-8859-1', $config3->get('Core.Encoding')); - $config4 = HTMLPurifier_HTML5Config::create(); + $config4 = HTMLPurifier_HTML5Config::create(null); $config4->set('Core.Encoding', 'iso-8859-1'); $this->assertInstanceOf('HTMLPurifier_Config', $config4); $this->assertEquals('iso-8859-1', $config4->get('Core.Encoding'));