wiki.techinc.nl/tests/phpunit/includes/specials/ImageListPagerTest.php
vladshapik 9cc797695b Hard deprecate User ::isIP, ::getOptions
Bug: T275602
Change-Id: Id4be13751ca0a900e51214c1855a4624077a5a62
2021-04-26 16:10:24 +00:00

37 lines
911 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 MediaWikiIntegrationTestCase {
/**
* @covers ImageListPager::formatValue
*/
public function testFormatValuesThrowException() {
$services = MediaWikiServices::getInstance();
$page = new ImageListPager(
RequestContext::getMain(),
null,
'',
false,
false,
$services->getLinkRenderer(),
$services->getRepoGroup(),
$services->getDBLoadBalancer(),
$services->getCommentStore(),
UserCache::singleton(),
$services->getUserNameUtils()
);
$this->expectException( MWException::class );
$this->expectExceptionMessage( "invalid_field" );
$page->formatValue( 'invalid_field', 'invalid_value' );
}
}