$this->assertUnPadded( 'revisionmonth1', $month );
}
- /**
- * Rough tests for {{SERVERNAME}} magic word
- * Bug 31176
- * @group Database
- * @dataProvider provideDataServernameFromDifferentProtocols
- */
- public function testServernameFromDifferentProtocols( $server ) {
- $this->setMwGlobals( 'wgServer', $server );
-
- $this->assertMagic( 'localhost', 'servername' );
- }
-
- public static function provideDataServernameFromDifferentProtocols() {
- return array(
- array( 'http://localhost/' ),
- array( 'https://localhost/' ),
- array( '//localhost/' ), # bug 31176
- );
- }
-
############### HELPERS ############################################
/** assertion helper expecting a magic output which is zero padded */
* Main assertion helper for magic variables padding
* @param string $magic Magic variable name
* @param mixed $value Month or day
- * @param string $format sprintf format for $value
+ * @param string $format Sprintf format for $value
*/
private function assertMagicPadding( $magic, $value, $format ) {
# Initialize parser timestamp as year 2010 at 12h34 56s.