Merge "Warn if stateful ParserOutput transforms are used"
[lhc/web/wiklou.git] / tests / parser / TestFileEditor.php
index 05b1216..1bee31e 100644 (file)
@@ -125,7 +125,7 @@ class TestFileEditor {
                $line = $this->lines[$this->pos++];
                $heading = $this->getHeading( $line );
                $expectedEnd = 'end' . $heading;
-               $contents = $line;
+               $contents = "$line\n";
 
                do {
                        $line = $this->lines[$this->pos++];
@@ -162,18 +162,18 @@ class TestFileEditor {
                                if ( isset( $changes[$sectionName] ) ) {
                                        $change = $changes[$sectionName];
                                        switch ( $change['op'] ) {
-                                       case 'rename':
-                                               $test[$i]['name'] = $change['value'];
-                                               $test[$i]['headingLine'] = "!! {$change['value']}";
-                                               break;
-                                       case 'update':
-                                               $test[$i]['contents'] = $change['value'];
-                                               break;
-                                       case 'delete':
-                                               $test[$i]['deleted'] = true;
-                                               break;
-                                       default:
-                                               throw new Exception( "Unknown op: ${change['op']}" );
+                                               case 'rename':
+                                                       $test[$i]['name'] = $change['value'];
+                                                       $test[$i]['headingLine'] = "!! {$change['value']}";
+                                                       break;
+                                               case 'update':
+                                                       $test[$i]['contents'] = $change['value'];
+                                                       break;
+                                               case 'delete':
+                                                       $test[$i]['deleted'] = true;
+                                                       break;
+                                               default:
+                                                       throw new Exception( "Unknown op: ${change['op']}" );
                                        }
                                        // Acknowledge
                                        // Note that we use the old section name for the rename op