X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fcontent%2FWikitextContentHandlerTest.php;h=e18cecb40207d105a6a2448cd6d0f299f74df00a;hp=31d90cb56866b1f8eb7939ac477c4477dd53f4d7;hb=82bd6b026ef6ecb7f2fe15acaa40c608680dfff1;hpb=8318677eee09085060a9bcbab7cb8db80fd6ac3b diff --git a/tests/phpunit/includes/content/WikitextContentHandlerTest.php b/tests/phpunit/includes/content/WikitextContentHandlerTest.php index 31d90cb568..e18cecb402 100644 --- a/tests/phpunit/includes/content/WikitextContentHandlerTest.php +++ b/tests/phpunit/includes/content/WikitextContentHandlerTest.php @@ -44,10 +44,10 @@ class WikitextContentHandlerTest extends MediaWikiLangTestCase { */ public function testUnserializeContent() { $content = $this->handler->unserializeContent( 'hello world' ); - $this->assertEquals( 'hello world', $content->getNativeData() ); + $this->assertEquals( 'hello world', $content->getText() ); $content = $this->handler->unserializeContent( 'hello world', CONTENT_FORMAT_WIKITEXT ); - $this->assertEquals( 'hello world', $content->getNativeData() ); + $this->assertEquals( 'hello world', $content->getText() ); try { $this->handler->unserializeContent( 'hello world', 'dummy/foo' ); @@ -64,7 +64,7 @@ class WikitextContentHandlerTest extends MediaWikiLangTestCase { $content = $this->handler->makeEmptyContent(); $this->assertTrue( $content->isEmpty() ); - $this->assertEquals( '', $content->getNativeData() ); + $this->assertSame( '', $content->getText() ); } public static function dataIsSupportedFormat() { @@ -172,7 +172,7 @@ class WikitextContentHandlerTest extends MediaWikiLangTestCase { $merged = $this->handler->merge3( $oldContent, $myContent, $yourContent ); - $this->assertEquals( $expected, $merged ? $merged->getNativeData() : $merged ); + $this->assertEquals( $expected, $merged ? $merged->getText() : $merged ); } public static function dataGetAutosummary() { @@ -366,6 +366,9 @@ class WikitextContentHandlerTest extends MediaWikiLangTestCase { $this->assertEquals( 'This is file content', $data['file_text'] ); } + /** + * @covers ContentHandler::getSecondaryDataUpdates + */ public function testGetSecondaryDataUpdates() { $title = Title::newFromText( 'Somefile.jpg', NS_FILE ); $content = new WikitextContent( '' ); @@ -379,6 +382,9 @@ class WikitextContentHandlerTest extends MediaWikiLangTestCase { $this->assertEquals( [], $updates ); } + /** + * @covers ContentHandler::getDeletionUpdates + */ public function testGetDeletionUpdates() { $title = Title::newFromText( 'Somefile.jpg', NS_FILE ); $content = new WikitextContent( '' );