Skip to content

Commit

Permalink
Make HTML5Config::create() default arguments the same as Config::crea…
Browse files Browse the repository at this point in the history
…te()
  • Loading branch information
xemlock committed Feb 8, 2018
1 parent 4fe95e0 commit 793676c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions library/HTMLPurifier/HTML5Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -53,5 +53,3 @@ public static function createDefault()
return $config;
}
}

// vim: et sw=4 sts=4
2 changes: 1 addition & 1 deletion tests/HTMLPurifier/AttrDef/HTML/Bool2Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
4 changes: 2 additions & 2 deletions tests/HTMLPurifier/HTML5ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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'));
Expand Down

0 comments on commit 793676c

Please sign in to comment.