X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fsite%2FSiteImporterTest.php;h=a49f06cfede1da59aaa0c151ddbc062f989827cc;hb=283962b59ec3f01f6ab12c7948191ee60c3a9a0d;hp=cb0316ab25334e01fc705e4c781ba38385ab57a7;hpb=497189d0a628cbb911ff12a2f40516e2f7b5ebe2;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/site/SiteImporterTest.php b/tests/phpunit/includes/site/SiteImporterTest.php index cb0316ab25..a49f06cfed 100644 --- a/tests/phpunit/includes/site/SiteImporterTest.php +++ b/tests/phpunit/includes/site/SiteImporterTest.php @@ -34,11 +34,10 @@ class SiteImporterTest extends PHPUnit_Framework_TestCase { private function newSiteImporter( array $expectedSites, $errorCount ) { $store = $this->getMock( 'SiteStore' ); - $self = $this; $store->expects( $this->once() ) ->method( 'saveSites' ) - ->will( $this->returnCallback( function ( $sites ) use ( $expectedSites, $self ) { - $self->assertSitesEqual( $expectedSites, $sites ); + ->will( $this->returnCallback( function ( $sites ) use ( $expectedSites ) { + $this->assertSitesEqual( $expectedSites, $sites ); } ) ); $store->expects( $this->any() ) @@ -141,12 +140,12 @@ class SiteImporterTest extends PHPUnit_Framework_TestCase { /** * @dataProvider provideImportFromXML */ - public function testImportFromXML( $xml, array $expectedSites, $errorCount = 0 ) { + public function testImportFromXML( $xml, array $expectedSites, $errorCount = 0 ) { $importer = $this->newSiteImporter( $expectedSites, $errorCount ); $importer->importFromXML( $xml ); } - public function testImportFromXML_malformed() { + public function testImportFromXML_malformed() { $this->setExpectedException( 'Exception' ); $store = $this->getMock( 'SiteStore' ); @@ -154,7 +153,7 @@ class SiteImporterTest extends PHPUnit_Framework_TestCase { $importer->importFromXML( 'THIS IS NOT XML' ); } - public function testImportFromFile() { + public function testImportFromFile() { $foo = Site::newForType( Site::TYPE_UNKNOWN ); $foo->setGlobalId( 'Foo' );