wiki.techinc.nl/tests/phpunit/includes/specials/ImageListPagerTest.php
Umherirrender e3c9107089 Use the existing link renderer in the special page pagers
Use SpecialPage::getLinkRenderer and pass it to the pagers
Since I082152b64141f1a9a4085bba23fe81a99ec8d886 it is a property in the
IndexPager and can be used by getLinkRenderer

Change-Id: I2be8a8b9f2b0b8c04fe9e18aa1959987fc125f50
2019-09-01 20:32:30 +02:00

25 lines
678 B
PHP

<?php
use MediaWiki\MediaWikiServices;
/**
* Test class for ImageListPagerTest class.
*
* Copyright © 2013, Antoine Musso
* Copyright © 2013, Siebrand Mazeland
* Copyright © 2013, Wikimedia Foundation Inc.
*
* @group Database
*/
class ImageListPagerTest extends MediaWikiTestCase {
/**
* @expectedException MWException
* @expectedExceptionMessage invalid_field
* @covers ImageListPager::formatValue
*/
public function testFormatValuesThrowException() {
$page = new ImageListPager( RequestContext::getMain(), null, '', false, false,
MediaWikiServices::getInstance()->getLinkRenderer() );
$page->formatValue( 'invalid_field', 'invalid_value' );
}
}