MediaWiki  1.23.2
IEUrlExtensionTest.php
Go to the documentation of this file.
1 <?php
2 
12  public function testSimple() {
13  $this->assertEquals(
14  'y',
16  'Simple extension'
17  );
18  }
19 
23  public function testSimpleNoExt() {
24  $this->assertEquals(
25  '',
27  'No extension'
28  );
29  }
30 
34  public function testEmpty() {
35  $this->assertEquals(
36  '',
38  'Empty string'
39  );
40  }
41 
45  public function testQuestionMark() {
46  $this->assertEquals(
47  '',
49  'Question mark only'
50  );
51  }
52 
56  public function testExtQuestionMark() {
57  $this->assertEquals(
58  'x',
60  'Extension then question mark'
61  );
62  }
63 
67  public function testQuestionMarkExt() {
68  $this->assertEquals(
69  'x',
71  'Question mark then extension'
72  );
73  }
74 
78  public function testInvalidChar() {
79  $this->assertEquals(
80  '',
82  'Extension with invalid character'
83  );
84  }
85 
89  public function testInvalidCharThenExtension() {
90  $this->assertEquals(
91  'x',
93  'Invalid character followed by an extension'
94  );
95  }
96 
100  public function testMultipleQuestionMarks() {
101  $this->assertEquals(
102  'c',
103  IEUrlExtension::findIE6Extension( 'a?b?.c?.d?e?f' ),
104  'Multiple question marks'
105  );
106  }
107 
111  public function testExeException() {
112  $this->assertEquals(
113  'd',
114  IEUrlExtension::findIE6Extension( 'a?b?.exe?.d?.e' ),
115  '.exe exception'
116  );
117  }
118 
122  public function testExeException2() {
123  $this->assertEquals(
124  'exe',
125  IEUrlExtension::findIE6Extension( 'a?b?.exe' ),
126  '.exe exception 2'
127  );
128  }
129 
133  public function testHash() {
134  $this->assertEquals(
135  '',
137  'Hash character preceding extension'
138  );
139  }
140 
144  public function testHash2() {
145  $this->assertEquals(
146  '',
148  'Hash character preceding extension 2'
149  );
150  }
151 
155  public function testDotAtEnd() {
156  $this->assertEquals(
157  '',
159  'Dot at end of string'
160  );
161  }
162 
166  public function testTwoDots() {
167  $this->assertEquals(
168  'z',
170  'Two dots'
171  );
172  }
173 }
IEUrlExtensionTest\testInvalidCharThenExtension
testInvalidCharThenExtension()
@covers IEUrlExtension::findIE6Extension
Definition: IEUrlExtensionTest.php:89
IEUrlExtensionTest\testDotAtEnd
testDotAtEnd()
@covers IEUrlExtension::findIE6Extension
Definition: IEUrlExtensionTest.php:155
IEUrlExtensionTest\testSimple
testSimple()
@covers IEUrlExtension::findIE6Extension
Definition: IEUrlExtensionTest.php:12
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
IEUrlExtensionTest\testEmpty
testEmpty()
@covers IEUrlExtension::findIE6Extension
Definition: IEUrlExtensionTest.php:34
IEUrlExtensionTest\testTwoDots
testTwoDots()
@covers IEUrlExtension::findIE6Extension
Definition: IEUrlExtensionTest.php:166
IEUrlExtensionTest\testHash2
testHash2()
@covers IEUrlExtension::findIE6Extension
Definition: IEUrlExtensionTest.php:144
IEUrlExtensionTest\testMultipleQuestionMarks
testMultipleQuestionMarks()
@covers IEUrlExtension::findIE6Extension
Definition: IEUrlExtensionTest.php:100
IEUrlExtensionTest\testHash
testHash()
@covers IEUrlExtension::findIE6Extension
Definition: IEUrlExtensionTest.php:133
IEUrlExtensionTest
Tests for IEUrlExtension::findIE6Extension.
Definition: IEUrlExtensionTest.php:8
MediaWikiTestCase
Definition: MediaWikiTestCase.php:6
IEUrlExtensionTest\testQuestionMarkExt
testQuestionMarkExt()
@covers IEUrlExtension::findIE6Extension
Definition: IEUrlExtensionTest.php:67
IEUrlExtensionTest\testQuestionMark
testQuestionMark()
@covers IEUrlExtension::findIE6Extension
Definition: IEUrlExtensionTest.php:45
IEUrlExtensionTest\testExeException2
testExeException2()
@covers IEUrlExtension::findIE6Extension
Definition: IEUrlExtensionTest.php:122
IEUrlExtensionTest\testInvalidChar
testInvalidChar()
@covers IEUrlExtension::findIE6Extension
Definition: IEUrlExtensionTest.php:78
IEUrlExtensionTest\testExeException
testExeException()
@covers IEUrlExtension::findIE6Extension
Definition: IEUrlExtensionTest.php:111
IEUrlExtensionTest\testSimpleNoExt
testSimpleNoExt()
@covers IEUrlExtension::findIE6Extension
Definition: IEUrlExtensionTest.php:23
IEUrlExtension\findIE6Extension
static findIE6Extension( $url)
Determine what extension IE6 will infer from a certain query string.
Definition: IEUrlExtension.php:193
IEUrlExtensionTest\testExtQuestionMark
testExtQuestionMark()
@covers IEUrlExtension::findIE6Extension
Definition: IEUrlExtensionTest.php:56