Merge "Add semantic tags to license info text"
[lhc/web/wiklou.git] / tests / phpunit / includes / libs / IEUrlExtensionTest.php
index e96953e..8192f01 100644 (file)
@@ -6,6 +6,9 @@
  *    ...a dataprovider and test method.
  */
 class IEUrlExtensionTest extends PHPUnit_Framework_TestCase {
+
+       use MediaWikiCoversValidator;
+
        /**
         * @covers IEUrlExtension::findIE6Extension
         */
@@ -170,4 +173,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'
+               );
+       }
 }