$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
20 lines
566 B
PHP
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() );
|
|
}
|
|
|
|
}
|