MediaWiki  1.23.13
TimeAdjustTest.php
Go to the documentation of this file.
1 <?php
2 
4  protected function setUp() {
5  parent::setUp();
6 
7  $this->iniSet( 'precision', 15 );
8  }
9 
15  public function testUserAdjust( $date, $localTZoffset, $expected ) {
17 
18  $this->setMwGlobals( 'wgLocalTZoffset', $localTZoffset );
19 
20  $this->assertEquals(
21  strval( $expected ),
22  strval( $wgContLang->userAdjust( $date, '' ) ),
23  "User adjust {$date} by {$localTZoffset} minutes should give {$expected}"
24  );
25  }
26 
27  public static function dataUserAdjust() {
28  return array(
29  array( 20061231235959, 0, 20061231235959 ),
30  array( 20061231235959, 5, 20070101000459 ),
31  array( 20061231235959, 15, 20070101001459 ),
32  array( 20061231235959, 60, 20070101005959 ),
33  array( 20061231235959, 90, 20070101012959 ),
34  array( 20061231235959, 120, 20070101015959 ),
35  array( 20061231235959, 540, 20070101085959 ),
36  array( 20061231235959, -5, 20061231235459 ),
37  array( 20061231235959, -30, 20061231232959 ),
38  array( 20061231235959, -60, 20061231225959 ),
39  );
40  }
41 }
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
$wgContLang
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as and the content language as $wgContLang
Definition: design.txt:56
TimeAdjustTest\setUp
setUp()
Definition: TimeAdjustTest.php:4
TimeAdjustTest
Definition: TimeAdjustTest.php:3
MediaWikiTestCase\setMwGlobals
setMwGlobals( $pairs, $value=null)
Definition: MediaWikiTestCase.php:302
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
MediaWikiLangTestCase
Base class that store and restore the Language objects.
Definition: MediaWikiLangTestCase.php:6
TimeAdjustTest\testUserAdjust
testUserAdjust( $date, $localTZoffset, $expected)
Test offset usage for a given Language::userAdjust @dataProvider dataUserAdjust @covers Language::use...
Definition: TimeAdjustTest.php:15
TimeAdjustTest\dataUserAdjust
static dataUserAdjust()
Definition: TimeAdjustTest.php:27