wiki.techinc.nl/tests/phpunit/includes/specials/ImageListPagerTest.php
James D. Forrester 83d76f4cb5 phpcs: Enable MediaWiki.Commenting.PhpunitAnnotations.ForbiddenExpectedException* and make pass
Change-Id: I63f97497714a32236268be6965c5e181dade6c58
2019-10-14 12:48:48 -07:00

25 lines
699 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 {
/**
* @covers ImageListPager::formatValue
*/
public function testFormatValuesThrowException() {
$page = new ImageListPager( RequestContext::getMain(), null, '', false, false,
MediaWikiServices::getInstance()->getLinkRenderer() );
$this->expectException( MWException::class );
$this->expectExceptionMessage( "invalid_field" );
$page->formatValue( 'invalid_field', 'invalid_value' );
}
}