*/
class SiteImporterTest extends PHPUnit_Framework_TestCase {
+ use MediaWikiCoversValidator;
+
private function newSiteImporter( array $expectedSites, $errorCount ) {
- $store = $this->getMock( 'SiteStore' );
+ $store = $this->getMockBuilder( 'SiteStore' )->getMock();
$store->expects( $this->once() )
->method( 'saveSites' )
->method( 'getSites' )
->will( $this->returnValue( new SiteList() ) );
- $errorHandler = $this->getMock( 'Psr\Log\LoggerInterface' );
+ $errorHandler = $this->getMockBuilder( 'Psr\Log\LoggerInterface' )->getMock();
$errorHandler->expects( $this->exactly( $errorCount ) )
->method( 'error' );
public function testImportFromXML_malformed() {
$this->setExpectedException( 'Exception' );
- $store = $this->getMock( 'SiteStore' );
+ $store = $this->getMockBuilder( 'SiteStore' )->getMock();
$importer = new SiteImporter( $store );
$importer->importFromXML( 'THIS IS NOT XML' );
}