X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fsite%2FSiteImporterTest.php;h=373dcc2912ce6e2d326e9d5619c8efc0c34278c9;hb=6b3e5511fb848890f174690885e748b90389c0b8;hp=8a43bf8020dbce79bc23a139e1a04766abf597d5;hpb=58858df842f91d9ea1c9f9b6f3c767d8b204886b;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/site/SiteImporterTest.php b/tests/phpunit/includes/site/SiteImporterTest.php index 8a43bf8020..373dcc2912 100644 --- a/tests/phpunit/includes/site/SiteImporterTest.php +++ b/tests/phpunit/includes/site/SiteImporterTest.php @@ -34,7 +34,7 @@ class SiteImporterTest extends PHPUnit_Framework_TestCase { use MediaWikiCoversValidator; 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 +46,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 +148,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' ); }