X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fsite%2FSiteImporterTest.php;h=bd95a501bec6a0d40bb4eff165464c90cad69815;hp=8a43bf8020dbce79bc23a139e1a04766abf597d5;hb=9b670fb797813a8ed35750e2c83fe953a10f349e;hpb=f036c5b324e2b2d240edf8d5eeb7fc2af3d88c47 diff --git a/tests/phpunit/includes/site/SiteImporterTest.php b/tests/phpunit/includes/site/SiteImporterTest.php index 8a43bf8020..bd95a501be 100644 --- a/tests/phpunit/includes/site/SiteImporterTest.php +++ b/tests/phpunit/includes/site/SiteImporterTest.php @@ -29,12 +29,13 @@ * * @author Daniel Kinzler */ -class SiteImporterTest extends PHPUnit_Framework_TestCase { +class SiteImporterTest extends PHPUnit\Framework\TestCase { use MediaWikiCoversValidator; + use PHPUnit4And6Compat; private function newSiteImporter( array $expectedSites, $errorCount ) { - $store = $this->getMockBuilder( 'SiteStore' )->getMock(); + $store = $this->getMockBuilder( SiteStore::class )->getMock(); $store->expects( $this->once() ) ->method( 'saveSites' ) @@ -46,7 +47,7 @@ class SiteImporterTest extends PHPUnit_Framework_TestCase { ->method( 'getSites' ) ->will( $this->returnValue( new SiteList() ) ); - $errorHandler = $this->getMockBuilder( 'Psr\Log\LoggerInterface' )->getMock(); + $errorHandler = $this->getMockBuilder( Psr\Log\LoggerInterface::class )->getMock(); $errorHandler->expects( $this->exactly( $errorCount ) ) ->method( 'error' ); @@ -148,9 +149,9 @@ class SiteImporterTest extends PHPUnit_Framework_TestCase { } public function testImportFromXML_malformed() { - $this->setExpectedException( 'Exception' ); + $this->setExpectedException( Exception::class ); - $store = $this->getMockBuilder( 'SiteStore' )->getMock(); + $store = $this->getMockBuilder( SiteStore::class )->getMock(); $importer = new SiteImporter( $store ); $importer->importFromXML( 'THIS IS NOT XML' ); }