From 2b740d448a058215245e2b3ab4193acb54016b2f Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 25 Apr 2012 20:45:32 +0200 Subject: [PATCH] use text/x-wiki instead of application/x-wiki, as per brions comment on wikitech-l --- includes/ContentHandler.php | 2 +- tests/phpunit/includes/ContentHandlerTest.php | 2 +- tests/phpunit/includes/WikitextContentHandlerTest.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/ContentHandler.php b/includes/ContentHandler.php index d434a216fd..145749f404 100644 --- a/includes/ContentHandler.php +++ b/includes/ContentHandler.php @@ -711,7 +711,7 @@ abstract class TextContentHandler extends ContentHandler { class WikitextContentHandler extends TextContentHandler { public function __construct( $modelName = CONTENT_MODEL_WIKITEXT ) { - parent::__construct( $modelName, array( 'application/x-wiki' ) ); + parent::__construct( $modelName, array( 'text/x-wiki' ) ); } public function unserializeContent( $text, $format = null ) { diff --git a/tests/phpunit/includes/ContentHandlerTest.php b/tests/phpunit/includes/ContentHandlerTest.php index 704ad717f3..f63d5def07 100644 --- a/tests/phpunit/includes/ContentHandlerTest.php +++ b/tests/phpunit/includes/ContentHandlerTest.php @@ -106,7 +106,7 @@ class ContentHandlerTest extends MediaWikiTestCase { array( 'hallo', 'MediaWiki:Test.js', null, null, CONTENT_MODEL_JAVASCRIPT, 'hallo', false ), array( serialize('hallo'), 'Dummy:Test', null, null, 'DUMMY', 'hallo', false ), - array( 'hallo', 'Test', null, 'application/x-wiki', CONTENT_MODEL_WIKITEXT, 'hallo', false ), + array( 'hallo', 'Test', null, 'text/x-wiki', CONTENT_MODEL_WIKITEXT, 'hallo', false ), array( 'hallo', 'MediaWiki:Test.js', null, 'text/javascript', CONTENT_MODEL_JAVASCRIPT, 'hallo', false ), array( serialize('hallo'), 'Dummy:Test', null, 'dummy', 'DUMMY', 'hallo', false ), diff --git a/tests/phpunit/includes/WikitextContentHandlerTest.php b/tests/phpunit/includes/WikitextContentHandlerTest.php index 7edb642a3c..c6b899f3bd 100644 --- a/tests/phpunit/includes/WikitextContentHandlerTest.php +++ b/tests/phpunit/includes/WikitextContentHandlerTest.php @@ -18,7 +18,7 @@ class WikitextContentHandlerTest extends MediaWikiTestCase { $content = new WikitextContent( 'hello world' ); $this->assertEquals( 'hello world', $this->handler->serializeContent( $content ) ); - $this->assertEquals( 'hello world', $this->handler->serializeContent( $content, 'application/x-wiki' ) ); + $this->assertEquals( 'hello world', $this->handler->serializeContent( $content, 'text/x-wiki' ) ); try { $this->handler->serializeContent( $content, 'dummy/foo' ); @@ -32,7 +32,7 @@ class WikitextContentHandlerTest extends MediaWikiTestCase { $content = $this->handler->unserializeContent( 'hello world' ); $this->assertEquals( 'hello world', $content->getNativeData() ); - $content = $this->handler->unserializeContent( 'hello world', 'application/x-wiki' ); + $content = $this->handler->unserializeContent( 'hello world', 'text/x-wiki' ); $this->assertEquals( 'hello world', $content->getNativeData() ); try { @@ -53,7 +53,7 @@ class WikitextContentHandlerTest extends MediaWikiTestCase { public function dataIsSupportedFormat( ) { return array( array( null, true ), - array( 'application/x-wiki', true ), + array( 'text/x-wiki', true ), array( 'dummy/foo', false ), ); } -- 2.20.1