38 $store = $this->getMockBuilder( SiteStore::class )->getMock();
40 $store->expects( $this->once() )
41 ->method(
'saveSites' )
42 ->will( $this->returnCallback(
function ( $sites ) use ( $expectedSites ) {
46 $store->expects( $this->
any() )
47 ->method(
'getSites' )
48 ->will( $this->returnValue(
new SiteList() ) );
50 $errorHandler = $this->getMockBuilder( Psr\Log\LoggerInterface::class )->getMock();
51 $errorHandler->expects( $this->exactly( $errorCount ) )
55 $importer->setExceptionCallback( [ $errorHandler,
'error' ] );