35 $store = $this->getMockBuilder(
'SiteStore' )->getMock();
37 $store->expects( $this->once() )
38 ->method(
'saveSites' )
39 ->will( $this->returnCallback(
function ( $sites ) use ( $expectedSites ) {
43 $store->expects( $this->
any() )
44 ->method(
'getSites' )
45 ->will( $this->returnValue(
new SiteList() ) );
47 $errorHandler = $this->getMockBuilder(
'Psr\Log\LoggerInterface' )->getMock();
48 $errorHandler->expects( $this->exactly( $errorCount ) )
52 $importer->setExceptionCallback( [ $errorHandler,
'error' ] );