r89559 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89558‎ | r89559 | r89560 >
Date:12:00, 6 June 2011
Author:tstarling
Status:ok
Tags:
Comment:
Test filename updates for r89558.
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/FindIE6ExtensionTest.php (deleted) (history)
  • /trunk/phase3/tests/phpunit/includes/libs/IEUrlExtensionTest.php (added) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/FindIE6ExtensionTest.php
@@ -1,118 +0,0 @@
2 -<?php
3 -
4 -/**
5 - * Tests for IEUrlExtension::findIE6Extension
6 - */
7 -class IEUrlExtensionTest extends MediaWikiTestCase {
8 - function testSimple() {
9 - $this->assertEquals(
10 - 'y',
11 - IEUrlExtension::findIE6Extension( 'x.y' ),
12 - 'Simple extension'
13 - );
14 - }
15 -
16 - function testSimpleNoExt() {
17 - $this->assertEquals(
18 - '',
19 - IEUrlExtension::findIE6Extension( 'x' ),
20 - 'No extension'
21 - );
22 - }
23 -
24 - function testEmpty() {
25 - $this->assertEquals(
26 - '',
27 - IEUrlExtension::findIE6Extension( '' ),
28 - 'Empty string'
29 - );
30 - }
31 -
32 - function testQuestionMark() {
33 - $this->assertEquals(
34 - '',
35 - IEUrlExtension::findIE6Extension( '?' ),
36 - 'Question mark only'
37 - );
38 - }
39 -
40 - function testExtQuestionMark() {
41 - $this->assertEquals(
42 - 'x',
43 - IEUrlExtension::findIE6Extension( '.x?' ),
44 - 'Extension then question mark'
45 - );
46 - }
47 -
48 - function testQuestionMarkExt() {
49 - $this->assertEquals(
50 - 'x',
51 - IEUrlExtension::findIE6Extension( '?.x' ),
52 - 'Question mark then extension'
53 - );
54 - }
55 -
56 - function testInvalidChar() {
57 - $this->assertEquals(
58 - '',
59 - IEUrlExtension::findIE6Extension( '.x*' ),
60 - 'Extension with invalid character'
61 - );
62 - }
63 -
64 - function testInvalidCharThenExtension() {
65 - $this->assertEquals(
66 - 'x',
67 - IEUrlExtension::findIE6Extension( '*.x' ),
68 - 'Invalid character followed by an extension'
69 - );
70 - }
71 -
72 - function testMultipleQuestionMarks() {
73 - $this->assertEquals(
74 - 'c',
75 - IEUrlExtension::findIE6Extension( 'a?b?.c?.d?e?f' ),
76 - 'Multiple question marks'
77 - );
78 - }
79 -
80 - function testExeException() {
81 - $this->assertEquals(
82 - 'd',
83 - IEUrlExtension::findIE6Extension( 'a?b?.exe?.d?.e' ),
84 - '.exe exception'
85 - );
86 - }
87 -
88 - function testExeException2() {
89 - $this->assertEquals(
90 - 'exe',
91 - IEUrlExtension::findIE6Extension( 'a?b?.exe' ),
92 - '.exe exception 2'
93 - );
94 - }
95 -
96 - function testHash() {
97 - $this->assertEquals(
98 - '',
99 - IEUrlExtension::findIE6Extension( 'a#b.c' ),
100 - 'Hash character preceding extension'
101 - );
102 - }
103 -
104 - function testHash2() {
105 - $this->assertEquals(
106 - '',
107 - IEUrlExtension::findIE6Extension( 'a?#b.c' ),
108 - 'Hash character preceding extension 2'
109 - );
110 - }
111 -
112 - function testDotAtEnd() {
113 - $this->assertEquals(
114 - '',
115 - IEUrlExtension::findIE6Extension( '.' ),
116 - 'Dot at end of string'
117 - );
118 - }
119 -}
Index: trunk/phase3/tests/phpunit/includes/libs/IEUrlExtensionTest.php
@@ -0,0 +1,118 @@
 2+<?php
 3+
 4+/**
 5+ * Tests for IEUrlExtension::findIE6Extension
 6+ */
 7+class IEUrlExtensionTest extends MediaWikiTestCase {
 8+ function testSimple() {
 9+ $this->assertEquals(
 10+ 'y',
 11+ IEUrlExtension::findIE6Extension( 'x.y' ),
 12+ 'Simple extension'
 13+ );
 14+ }
 15+
 16+ function testSimpleNoExt() {
 17+ $this->assertEquals(
 18+ '',
 19+ IEUrlExtension::findIE6Extension( 'x' ),
 20+ 'No extension'
 21+ );
 22+ }
 23+
 24+ function testEmpty() {
 25+ $this->assertEquals(
 26+ '',
 27+ IEUrlExtension::findIE6Extension( '' ),
 28+ 'Empty string'
 29+ );
 30+ }
 31+
 32+ function testQuestionMark() {
 33+ $this->assertEquals(
 34+ '',
 35+ IEUrlExtension::findIE6Extension( '?' ),
 36+ 'Question mark only'
 37+ );
 38+ }
 39+
 40+ function testExtQuestionMark() {
 41+ $this->assertEquals(
 42+ 'x',
 43+ IEUrlExtension::findIE6Extension( '.x?' ),
 44+ 'Extension then question mark'
 45+ );
 46+ }
 47+
 48+ function testQuestionMarkExt() {
 49+ $this->assertEquals(
 50+ 'x',
 51+ IEUrlExtension::findIE6Extension( '?.x' ),
 52+ 'Question mark then extension'
 53+ );
 54+ }
 55+
 56+ function testInvalidChar() {
 57+ $this->assertEquals(
 58+ '',
 59+ IEUrlExtension::findIE6Extension( '.x*' ),
 60+ 'Extension with invalid character'
 61+ );
 62+ }
 63+
 64+ function testInvalidCharThenExtension() {
 65+ $this->assertEquals(
 66+ 'x',
 67+ IEUrlExtension::findIE6Extension( '*.x' ),
 68+ 'Invalid character followed by an extension'
 69+ );
 70+ }
 71+
 72+ function testMultipleQuestionMarks() {
 73+ $this->assertEquals(
 74+ 'c',
 75+ IEUrlExtension::findIE6Extension( 'a?b?.c?.d?e?f' ),
 76+ 'Multiple question marks'
 77+ );
 78+ }
 79+
 80+ function testExeException() {
 81+ $this->assertEquals(
 82+ 'd',
 83+ IEUrlExtension::findIE6Extension( 'a?b?.exe?.d?.e' ),
 84+ '.exe exception'
 85+ );
 86+ }
 87+
 88+ function testExeException2() {
 89+ $this->assertEquals(
 90+ 'exe',
 91+ IEUrlExtension::findIE6Extension( 'a?b?.exe' ),
 92+ '.exe exception 2'
 93+ );
 94+ }
 95+
 96+ function testHash() {
 97+ $this->assertEquals(
 98+ '',
 99+ IEUrlExtension::findIE6Extension( 'a#b.c' ),
 100+ 'Hash character preceding extension'
 101+ );
 102+ }
 103+
 104+ function testHash2() {
 105+ $this->assertEquals(
 106+ '',
 107+ IEUrlExtension::findIE6Extension( 'a?#b.c' ),
 108+ 'Hash character preceding extension 2'
 109+ );
 110+ }
 111+
 112+ function testDotAtEnd() {
 113+ $this->assertEquals(
 114+ '',
 115+ IEUrlExtension::findIE6Extension( '.' ),
 116+ 'Dot at end of string'
 117+ );
 118+ }
 119+}
Property changes on: trunk/phase3/tests/phpunit/includes/libs/IEUrlExtensionTest.php
___________________________________________________________________
Added: svn:eol-style
1120 + native

Follow-up revisions

RevisionCommit summaryAuthorDate
r92339REL1_18 MFT r89401, r89451, r89512, r89513, r89523, r89529, r89532, r89549, r...reedy23:08, 15 July 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r89558* Added a REQUEST_URI check to the bug 28235 handling....tstarling11:59, 6 June 2011

Status & tagging log