/** * @covers WikitextContentHandler::unserializeContent */ public function testUnserializeContent() { $content = $this->handler->unserializeContent('hello world'); $this->assertEquals('hello world', $content->getNativeData()); $content = $this->handler->unserializeContent('hello world', CONTENT_FORMAT_WIKITEXT); $this->assertEquals('hello world', $content->getNativeData()); try { $this->handler->unserializeContent('hello world', 'dummy/foo'); $this->fail("unserializeContent() should have failed on unknown format"); } catch (MWException $e) { // ok, as expected } }