[Unit testing] Re-order attribs to a-z to make testing more reliable
authorKrinkle <krinkle@users.mediawiki.org>
Wed, 25 Jan 2012 00:52:29 +0000 (00:52 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Wed, 25 Jan 2012 00:52:29 +0000 (00:52 +0000)
* This is in preparation for deprecating this in favor of an Html:: method soon, making sure here that tests still match afterwards
* Follows-up r109698

includes/Xml.php
tests/phpunit/includes/XmlTest.php

index fc4392a..863e872 100644 (file)
@@ -143,8 +143,8 @@ class Xml {
                        $options[] = self::option( $name, $index, $index === $selected );
                }
 
-               $ret = Xml::openElement( 'select', array( 'id' => 'namespace', 'name' => $element_name,
-                       'class' => 'namespaceselector' ) )
+               $ret = Xml::openElement( 'select', array( 'class' => 'namespaceselector', 'id' => 'namespace',
+                       'name' => $element_name ) )
                        . "\n"
                        . implode( "\n", $options )
                        . "\n"
index ce1724d..9d75616 100644 (file)
@@ -194,7 +194,7 @@ class XmlTest extends MediaWikiTestCase {
 
        function testNamespaceSelector() {
                $this->assertEquals(
-                       '<select id="namespace" name="namespace" class="namespaceselector">
+                       '<select class="namespaceselector" id="namespace" name="namespace">
 <option value="0">(Main)</option>
 <option value="1">Talk</option>
 <option value="2">User</option>
@@ -214,7 +214,7 @@ class XmlTest extends MediaWikiTestCase {
                        'Basic namespace selector without custom options'
                );
                $this->assertEquals(
-                       '<label for="myname">Select a namespace:</label>&#160;<select id="namespace" name="myname" class="namespaceselector">
+                       '<label for="myname">Select a namespace:</label>&#160;<select class="namespaceselector" id="namespace" name="myname">
 <option value="all">all</option>
 <option value="0">(Main)</option>
 <option value="1">Talk</option>