dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Revert "selenium: add new message banner test to user spec""
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
site
/
SiteImporterTest.php
diff --git
a/tests/phpunit/includes/site/SiteImporterTest.php
b/tests/phpunit/includes/site/SiteImporterTest.php
index
ea49429
..
373dcc2
100644
(file)
--- a/
tests/phpunit/includes/site/SiteImporterTest.php
+++ b/
tests/phpunit/includes/site/SiteImporterTest.php
@@
-31,8
+31,10
@@
*/
class SiteImporterTest extends PHPUnit_Framework_TestCase {
*/
class SiteImporterTest extends PHPUnit_Framework_TestCase {
+ use MediaWikiCoversValidator;
+
private function newSiteImporter( array $expectedSites, $errorCount ) {
private function newSiteImporter( array $expectedSites, $errorCount ) {
- $store = $this->getMockBuilder(
'SiteStore'
)->getMock();
+ $store = $this->getMockBuilder(
SiteStore::class
)->getMock();
$store->expects( $this->once() )
->method( 'saveSites' )
$store->expects( $this->once() )
->method( 'saveSites' )
@@
-44,7
+46,7
@@
class SiteImporterTest extends PHPUnit_Framework_TestCase {
->method( 'getSites' )
->will( $this->returnValue( new SiteList() ) );
->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' );
$errorHandler->expects( $this->exactly( $errorCount ) )
->method( 'error' );
@@
-146,9
+148,9
@@
class SiteImporterTest extends PHPUnit_Framework_TestCase {
}
public function testImportFromXML_malformed() {
}
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' );
}
$importer = new SiteImporter( $store );
$importer->importFromXML( 'THIS IS NOT XML' );
}