<?php
use MediaWiki\MediaWikiServices;
+use MediaWiki\Revision\SlotRenderingProvider;
/**
* @group ContentHandler
$this->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 );
+ }
+
}