/**
* Tests for IEUrlExtension::findIE6Extension
+ * @todo tests below for findIE6Extension should be split into...
+ * ...a dataprovider and test method.
*/
class IEUrlExtensionTest extends MediaWikiTestCase {
- function testSimple() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testSimple() {
$this->assertEquals(
'y',
IEUrlExtension::findIE6Extension( 'x.y' ),
);
}
- function testSimpleNoExt() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testSimpleNoExt() {
$this->assertEquals(
'',
IEUrlExtension::findIE6Extension( 'x' ),
);
}
- function testEmpty() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testEmpty() {
$this->assertEquals(
'',
IEUrlExtension::findIE6Extension( '' ),
);
}
- function testQuestionMark() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testQuestionMark() {
$this->assertEquals(
'',
IEUrlExtension::findIE6Extension( '?' ),
);
}
- function testExtQuestionMark() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testExtQuestionMark() {
$this->assertEquals(
'x',
IEUrlExtension::findIE6Extension( '.x?' ),
);
}
- function testQuestionMarkExt() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testQuestionMarkExt() {
$this->assertEquals(
'x',
IEUrlExtension::findIE6Extension( '?.x' ),
);
}
- function testInvalidChar() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testInvalidChar() {
$this->assertEquals(
'',
IEUrlExtension::findIE6Extension( '.x*' ),
);
}
- function testInvalidCharThenExtension() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testInvalidCharThenExtension() {
$this->assertEquals(
'x',
IEUrlExtension::findIE6Extension( '*.x' ),
);
}
- function testMultipleQuestionMarks() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testMultipleQuestionMarks() {
$this->assertEquals(
'c',
IEUrlExtension::findIE6Extension( 'a?b?.c?.d?e?f' ),
);
}
- function testExeException() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testExeException() {
$this->assertEquals(
'd',
IEUrlExtension::findIE6Extension( 'a?b?.exe?.d?.e' ),
);
}
- function testExeException2() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testExeException2() {
$this->assertEquals(
'exe',
IEUrlExtension::findIE6Extension( 'a?b?.exe' ),
);
}
- function testHash() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testHash() {
$this->assertEquals(
'',
IEUrlExtension::findIE6Extension( 'a#b.c' ),
);
}
- function testHash2() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testHash2() {
$this->assertEquals(
'',
IEUrlExtension::findIE6Extension( 'a?#b.c' ),
);
}
- function testDotAtEnd() {
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testDotAtEnd() {
$this->assertEquals(
'',
IEUrlExtension::findIE6Extension( '.' ),
'Dot at end of string'
);
}
+
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testTwoDots() {
+ $this->assertEquals(
+ 'z',
+ IEUrlExtension::findIE6Extension( 'x.y.z' ),
+ 'Two dots'
+ );
+ }
}