4 * Tests for IEUrlExtension::findIE6Extension
5 * @todo tests below for findIE6Extension should be split into...
6 * ...a dataprovider and test method.
8 class IEUrlExtensionTest
extends PHPUnit_Framework_TestCase
{
10 use MediaWikiCoversValidator
;
13 * @covers IEUrlExtension::findIE6Extension
15 public function testSimple() {
18 IEUrlExtension
::findIE6Extension( 'x.y' ),
24 * @covers IEUrlExtension::findIE6Extension
26 public function testSimpleNoExt() {
29 IEUrlExtension
::findIE6Extension( 'x' ),
35 * @covers IEUrlExtension::findIE6Extension
37 public function testEmpty() {
40 IEUrlExtension
::findIE6Extension( '' ),
46 * @covers IEUrlExtension::findIE6Extension
48 public function testQuestionMark() {
51 IEUrlExtension
::findIE6Extension( '?' ),
57 * @covers IEUrlExtension::findIE6Extension
59 public function testExtQuestionMark() {
62 IEUrlExtension
::findIE6Extension( '.x?' ),
63 'Extension then question mark'
68 * @covers IEUrlExtension::findIE6Extension
70 public function testQuestionMarkExt() {
73 IEUrlExtension
::findIE6Extension( '?.x' ),
74 'Question mark then extension'
79 * @covers IEUrlExtension::findIE6Extension
81 public function testInvalidChar() {
84 IEUrlExtension
::findIE6Extension( '.x*' ),
85 'Extension with invalid character'
90 * @covers IEUrlExtension::findIE6Extension
92 public function testInvalidCharThenExtension() {
95 IEUrlExtension
::findIE6Extension( '*.x' ),
96 'Invalid character followed by an extension'
101 * @covers IEUrlExtension::findIE6Extension
103 public function testMultipleQuestionMarks() {
106 IEUrlExtension
::findIE6Extension( 'a?b?.c?.d?e?f' ),
107 'Multiple question marks'
112 * @covers IEUrlExtension::findIE6Extension
114 public function testExeException() {
117 IEUrlExtension
::findIE6Extension( 'a?b?.exe?.d?.e' ),
123 * @covers IEUrlExtension::findIE6Extension
125 public function testExeException2() {
128 IEUrlExtension
::findIE6Extension( 'a?b?.exe' ),
134 * @covers IEUrlExtension::findIE6Extension
136 public function testHash() {
139 IEUrlExtension
::findIE6Extension( 'a#b.c' ),
140 'Hash character preceding extension'
145 * @covers IEUrlExtension::findIE6Extension
147 public function testHash2() {
150 IEUrlExtension
::findIE6Extension( 'a?#b.c' ),
151 'Hash character preceding extension 2'
156 * @covers IEUrlExtension::findIE6Extension
158 public function testDotAtEnd() {
161 IEUrlExtension
::findIE6Extension( '.' ),
162 'Dot at end of string'
167 * @covers IEUrlExtension::findIE6Extension
169 public function testTwoDots() {
172 IEUrlExtension
::findIE6Extension( 'x.y.z' ),
178 * @covers IEUrlExtension::findIE6Extension
180 public function testScriptQuery() {
183 IEUrlExtension
::findIE6Extension( 'example.php?foo=a&bar=b' ),
189 * @covers IEUrlExtension::findIE6Extension
191 public function testEscapedScriptQuery() {
194 IEUrlExtension
::findIE6Extension( 'example%2Ephp?foo=a&bar=b' ),
195 'Script with urlencoded dot and query'
200 * @covers IEUrlExtension::findIE6Extension
202 public function testEscapedScriptQueryDot() {
205 IEUrlExtension
::findIE6Extension( 'example%2Ephp?foo=a.x&bar=b.y' ),
206 'Script with urlencoded dot and query with dot'