Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | declare( strict_types=1 ); |
4 | |
5 | use MediaWiki\Config\ServiceOptions; |
6 | use MediaWiki\Extension\CampaignEvents\Database\CampaignsDatabaseHelper; |
7 | use MediaWiki\Extension\WikimediaCampaignEvents\Grants\FluxxClient; |
8 | use MediaWiki\Extension\WikimediaCampaignEvents\Grants\GrantIDLookup; |
9 | use MediaWiki\Extension\WikimediaCampaignEvents\Grants\GrantsStore; |
10 | use MediaWiki\Logger\LoggerFactory; |
11 | use MediaWiki\MediaWikiServices; |
12 | |
13 | // This file is actually covered by WikimediaCampaignEventsServicesTest, but it's not possible to specify a path |
14 | // in @covers annotations (https://github.com/sebastianbergmann/phpunit/issues/3794) |
15 | // @codeCoverageIgnoreStart |
16 | return [ |
17 | GrantsStore::SERVICE_NAME => static function ( MediaWikiServices $services ): GrantsStore { |
18 | return new GrantsStore( |
19 | $services->get( CampaignsDatabaseHelper::SERVICE_NAME ) |
20 | ); |
21 | }, |
22 | FluxxClient::SERVICE_NAME => static function ( MediaWikiServices $services ): FluxxClient { |
23 | return new FluxxClient( |
24 | $services->getHttpRequestFactory(), |
25 | new ServiceOptions( |
26 | FluxxClient::CONSTRUCTOR_OPTIONS, |
27 | $services->getMainConfig() |
28 | ), |
29 | $services->getMainWANObjectCache(), |
30 | LoggerFactory::getInstance( 'CampaignEvents' ), |
31 | ); |
32 | }, |
33 | GrantIDLookup::SERVICE_NAME => static function ( MediaWikiServices $services ): GrantIDLookup { |
34 | return new GrantIDLookup( |
35 | $services->get( FluxxClient::SERVICE_NAME ), |
36 | $services->getMainWANObjectCache() |
37 | ); |
38 | }, |
39 | ]; |
40 | // @codeCoverageIgnoreEnd |