summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/libs/IEUrlExtensionTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/includes/libs/IEUrlExtensionTest.php')
-rw-r--r--tests/phpunit/includes/libs/IEUrlExtensionTest.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/phpunit/includes/libs/IEUrlExtensionTest.php b/tests/phpunit/includes/libs/IEUrlExtensionTest.php
index e96953ee..57668e50 100644
--- a/tests/phpunit/includes/libs/IEUrlExtensionTest.php
+++ b/tests/phpunit/includes/libs/IEUrlExtensionTest.php
@@ -170,4 +170,37 @@ class IEUrlExtensionTest extends PHPUnit_Framework_TestCase {
'Two dots'
);
}
+
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testScriptQuery() {
+ $this->assertEquals(
+ 'php',
+ IEUrlExtension::findIE6Extension( 'example.php?foo=a&bar=b' ),
+ 'Script with query'
+ );
+ }
+
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testEscapedScriptQuery() {
+ $this->assertEquals(
+ '',
+ IEUrlExtension::findIE6Extension( 'example%2Ephp?foo=a&bar=b' ),
+ 'Script with urlencoded dot and query'
+ );
+ }
+
+ /**
+ * @covers IEUrlExtension::findIE6Extension
+ */
+ public function testEscapedScriptQueryDot() {
+ $this->assertEquals(
+ 'y',
+ IEUrlExtension::findIE6Extension( 'example%2Ephp?foo=a.x&bar=b.y' ),
+ 'Script with urlencoded dot and query with dot'
+ );
+ }
}