use application/x-wiki, not application/x-wikitext
authordaniel <daniel.kinzler@wikimedia.de>
Wed, 25 Apr 2012 16:12:11 +0000 (18:12 +0200)
committerdaniel <daniel.kinzler@wikimedia.de>
Wed, 25 Apr 2012 16:14:53 +0000 (18:14 +0200)
includes/ContentHandler.php
tests/phpunit/includes/ContentHandlerTest.php
tests/phpunit/includes/RevisionTest.php
tests/phpunit/includes/WikitextContentHandlerTest.php

index 438f78f..9c8d15b 100644 (file)
@@ -705,7 +705,7 @@ abstract class TextContentHandler extends ContentHandler {
 class WikitextContentHandler extends TextContentHandler {
 
     public function __construct( $modelName = CONTENT_MODEL_WIKITEXT ) {
-        parent::__construct( $modelName, array( 'application/x-wikitext' ) ); #FIXME: which mime type?
+        parent::__construct( $modelName, array( 'application/x-wiki' ) ); 
     }
 
     public function unserializeContent( $text, $format = null ) {
index 6deed47..038842f 100644 (file)
@@ -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-wikitext', CONTENT_MODEL_WIKITEXT, 'hallo', false ),
+            array( 'hallo', 'Test', null, 'application/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 ),
 
index e9243d4..14e2504 100644 (file)
@@ -190,7 +190,7 @@ class RevisionTest extends MediaWikiTestCase {
 
        function dataGetContentFormat() {
                return array(
-                       array( 'hello world', 'Hello', null, null, 'application/x-wikitext' ),
+                       array( 'hello world', 'Hello', null, null, 'application/x-wiki' ),
                        array( 'hello world', 'Hello', CONTENT_MODEL_CSS, null, 'text/css' ),
                        array( 'hello world', 'User:hello/there.css', null, null, 'text/css' ),
                        array( serialize('hello world'), 'Dummy:Hello', null, null, 'dummy' ),
index 1f073d2..53c968f 100644 (file)
@@ -15,7 +15,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-wikitext' ) );
+               $this->assertEquals( 'hello world', $this->handler->serializeContent( $content, 'application/x-wiki' ) );
 
                try {
                        $this->handler->serializeContent( $content, 'dummy/foo' );
@@ -29,7 +29,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-wikitext' );
+               $content = $this->handler->unserializeContent( 'hello world', 'application/x-wiki' );
                $this->assertEquals( 'hello world', $content->getNativeData() );
 
                try {
@@ -50,7 +50,7 @@ class WikitextContentHandlerTest extends MediaWikiTestCase {
        public function dataIsSupportedFormat( ) {
                return array(
                        array( null, true ),
-                       array( 'application/x-wikitext', true ),
+                       array( 'application/x-wiki', true ),
                        array( 'dummy/foo', false ),
                );
        }