Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
TitleFactoryMainPageUrl
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getValue
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace MediaWiki\Extension\WikibaseManifest;
4
5use TitleFactory;
6
7class TitleFactoryMainPageUrl {
8
9    private $titleFactory;
10
11    /**
12     * @param TitleFactory $titleFactory
13     */
14    public function __construct( TitleFactory $titleFactory ) {
15        $this->titleFactory = $titleFactory;
16    }
17
18    public function getValue(): string {
19        $mainPageTitle = $this->titleFactory->newMainPage();
20
21        return $mainPageTitle->getFullURL();
22    }
23}