Use MediaWikiCoversValidator for tests that don't use MediaWikiTestCase
[lhc/web/wiklou.git] / tests / phpunit / includes / site / SiteImporterTest.php
index 45241c5..8a43bf8 100644 (file)
  */
 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' )
@@ -44,7 +46,7 @@ class SiteImporterTest extends PHPUnit_Framework_TestCase {
                        ->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' );
 
@@ -148,7 +150,7 @@ class SiteImporterTest extends PHPUnit_Framework_TestCase {
        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' );
        }