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 ) {
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 ),
$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' );
$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 {
public function dataIsSupportedFormat( ) {
return array(
array( null, true ),
- array( 'application/x-wiki', true ),
+ array( 'text/x-wiki', true ),
array( 'dummy/foo', false ),
);
}