X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fcontent%2FWikitextContentHandlerTest.php;h=806038a06bf978499cd1b35cd3a16bbd9a0244b9;hb=7960d5385f1146459671148e2e34d3ba50e17aeb;hp=b4b2948ba8e5b725fd612a3b4c2bed312c5f0e2e;hpb=8d91ac5f12f6883b34f64991fd277954fe8ed37e;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/content/WikitextContentHandlerTest.php b/tests/phpunit/includes/content/WikitextContentHandlerTest.php index b4b2948ba8..806038a06b 100644 --- a/tests/phpunit/includes/content/WikitextContentHandlerTest.php +++ b/tests/phpunit/includes/content/WikitextContentHandlerTest.php @@ -1,6 +1,7 @@ assertArrayHasKey( 'file_text', $data ); $this->assertEquals( 'This is file content', $data['file_text'] ); } + + public function testGetSecondaryDataUpdates() { + $title = Title::newFromText( 'Somefile.jpg', NS_FILE ); + $content = new WikitextContent( '' ); + + /** @var SlotRenderingProvider $srp */ + $srp = $this->getMock( SlotRenderingProvider::class ); + + $handler = new WikitextContentHandler(); + $updates = $handler->getSecondaryDataUpdates( $title, $content, 'main', $srp ); + + $this->assertEquals( [], $updates ); + } + + public function testGetDeletionUpdates() { + $title = Title::newFromText( 'Somefile.jpg', NS_FILE ); + $content = new WikitextContent( '' ); + + $srp = $this->getMock( SlotRenderingProvider::class ); + + $handler = new WikitextContentHandler(); + $updates = $handler->getDeletionUpdates( $title, 'main' ); + + $this->assertEquals( [], $updates ); + } + }