wiki.techinc.nl/tests/phpunit/includes/MediaWikiVersionFetcherTest.php
Timo Tijhof a5d5ea82ca Provide MW_VERSION and deprecate fake global $wgVersion
$wgVersion is not a configuration variable, it should never be
changed at run-time.

While we've gone in the route of class constants for most constants,
this one will not benefit from class-autoloading since it needs to
be present from the very beginning.

MW_VERSION is named similarly as PHP_VERSION, and $wgVersion is
now soft-deprecated.

Bug: T212738
Change-Id: I04628de4152dd5c72646813e08ff35e422e265a4
2020-02-25 01:55:21 +00:00

20 lines
566 B
PHP

<?php
/**
* Note: this is not a unit test, as it touches the file system and reads an actual file.
* If unit tests are added for MediaWikiVersionFetcher, this should be done in a distinct test case.
*
* @covers MediaWikiVersionFetcher
*
* @group ComposerHooks
*
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
*/
class MediaWikiVersionFetcherTest extends \MediaWikiIntegrationTestCase {
public function testReturnsResult() {
$versionFetcher = new MediaWikiVersionFetcher();
$this->assertSame( MW_VERSION, $versionFetcher->fetchVersion() );
}
}