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 | /** |
| 4 | * ServiceWiring files for VisualEditor. |
| 5 | * |
| 6 | * @file |
| 7 | * @ingroup Extensions |
| 8 | * @copyright 2011-2021 VisualEditor Team and others; see AUTHORS.txt |
| 9 | * @license MIT |
| 10 | */ |
| 11 | |
| 12 | namespace MediaWiki\Extension\VisualEditor; |
| 13 | |
| 14 | use MediaWiki\Config\ServiceOptions; |
| 15 | use MediaWiki\Extension\VisualEditor\Services\VisualEditorAvailabilityLookup; |
| 16 | use MediaWiki\MediaWikiServices; |
| 17 | |
| 18 | // PHP unit does not understand code coverage for this file |
| 19 | // as the @covers annotation cannot cover a specific file |
| 20 | // This is fully tested in ServiceWiringTest.php |
| 21 | // @codeCoverageIgnoreStart |
| 22 | |
| 23 | return [ |
| 24 | VisualEditorParsoidClientFactory::SERVICE_NAME => static function ( |
| 25 | MediaWikiServices $services |
| 26 | ): VisualEditorParsoidClientFactory { |
| 27 | return new VisualEditorParsoidClientFactory( $services->getPageRestHelperFactory() ); |
| 28 | }, |
| 29 | VisualEditorAvailabilityLookup::SERVICE_NAME => static function ( |
| 30 | MediaWikiServices $services |
| 31 | ) { |
| 32 | return new VisualEditorAvailabilityLookup( |
| 33 | new ServiceOptions( |
| 34 | VisualEditorAvailabilityLookup::CONSTRUCTOR_OPTIONS, |
| 35 | $services->getMainConfig() |
| 36 | ), |
| 37 | $services->getNamespaceInfo(), |
| 38 | $services->getExtensionRegistry(), |
| 39 | $services->getUserOptionsLookup() |
| 40 | ); |
| 41 | }, |
| 42 | ]; |
| 43 | |
| 44 | // @codeCoverageIgnoreEnd |