SECURITY: blacklist CSS var()
[lhc/web/wiklou.git] / tests / phpunit / includes / HtmlTest.php
index 5663a60..999e0bb 100644 (file)
@@ -66,13 +66,25 @@ class HtmlTest extends MediaWikiTestCase {
        }
 
        protected function tearDown() {
+               Language::factory( 'en' )->resetNamespaces();
+
                if ( $this->restoreWarnings ) {
                        $this->restoreWarnings = false;
                        Wikimedia\restoreWarnings();
                }
+
                parent::tearDown();
        }
 
+       /**
+        * @expectedException PHPUnit_Framework_Error_Notice
+        * @expectedExceptionMessage given element name with space
+        * @covers Html::openElement
+        */
+       public function testOpenElement() {
+               Html::openElement( 'span id="x"' );
+       }
+
        /**
         * @covers Html::element
         * @covers Html::rawElement
@@ -200,7 +212,6 @@ class HtmlTest extends MediaWikiTestCase {
        }
 
        /**
-        * Test for Html::expandAttributes()
         * Please note it output a string prefixed with a space!
         * @covers Html::expandAttributes
         */