66fe915afb2bcc1ce3b23f2f4102a8a216a3c440
4 * Tests for IEUrlExtension::findIE6Extension
6 class IEUrlExtensionTest
extends MediaWikiTestCase
{
7 public function testSimple() {
10 IEUrlExtension
::findIE6Extension( 'x.y' ),
15 public function testSimpleNoExt() {
18 IEUrlExtension
::findIE6Extension( 'x' ),
23 public function testEmpty() {
26 IEUrlExtension
::findIE6Extension( '' ),
31 public function testQuestionMark() {
34 IEUrlExtension
::findIE6Extension( '?' ),
39 public function testExtQuestionMark() {
42 IEUrlExtension
::findIE6Extension( '.x?' ),
43 'Extension then question mark'
47 public function testQuestionMarkExt() {
50 IEUrlExtension
::findIE6Extension( '?.x' ),
51 'Question mark then extension'
55 public function testInvalidChar() {
58 IEUrlExtension
::findIE6Extension( '.x*' ),
59 'Extension with invalid character'
63 public function testInvalidCharThenExtension() {
66 IEUrlExtension
::findIE6Extension( '*.x' ),
67 'Invalid character followed by an extension'
71 public function testMultipleQuestionMarks() {
74 IEUrlExtension
::findIE6Extension( 'a?b?.c?.d?e?f' ),
75 'Multiple question marks'
79 public function testExeException() {
82 IEUrlExtension
::findIE6Extension( 'a?b?.exe?.d?.e' ),
87 public function testExeException2() {
90 IEUrlExtension
::findIE6Extension( 'a?b?.exe' ),
95 public function testHash() {
98 IEUrlExtension
::findIE6Extension( 'a#b.c' ),
99 'Hash character preceding extension'
103 public function testHash2() {
106 IEUrlExtension
::findIE6Extension( 'a?#b.c' ),
107 'Hash character preceding extension 2'
111 public function testDotAtEnd() {
114 IEUrlExtension
::findIE6Extension( '.' ),
115 'Dot at end of string'
119 public function testTwoDots() {
122 IEUrlExtension
::findIE6Extension( 'x.y.z' ),