Only testGetSlotDiffRenderer() requires integration Clean up the code that is being moved, and fix the remaining covers in the integration test Change-Id: Ic5926b23daf6738c44d9a5aacb75276f81c51f7a
27 lines
712 B
PHP
27 lines
712 B
PHP
<?php
|
|
|
|
/**
|
|
* See also unit tests at \MediaWiki\Tests\Unit\FallbackContentHandlerTest
|
|
*
|
|
* @group ContentHandler
|
|
*/
|
|
class FallbackContentHandlerTest extends MediaWikiLangTestCase {
|
|
|
|
/**
|
|
* @covers ContentHandler::getSlotDiffRenderer
|
|
*/
|
|
public function testGetSlotDiffRenderer() {
|
|
$context = new RequestContext();
|
|
$context->setRequest( new FauxRequest() );
|
|
|
|
$handler = new FallbackContentHandler( 'horkyporky' );
|
|
$slotDiffRenderer = $handler->getSlotDiffRenderer( $context );
|
|
|
|
$oldContent = $handler->unserializeContent( 'Foo' );
|
|
$newContent = $handler->unserializeContent( 'Foo bar' );
|
|
|
|
$diff = $slotDiffRenderer->getDiff( $oldContent, $newContent );
|
|
$this->assertNotEmpty( $diff );
|
|
}
|
|
|
|
}
|