From 8bbf02ab8354fbb364d0b4712ba83a5f2b3d1666 Mon Sep 17 00:00:00 2001 From: Platonides Date: Fri, 28 May 2010 14:54:09 +0000 Subject: [PATCH] With the conversion to a class it no longer uses $filename but $this->file --- maintenance/parserTests.inc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/maintenance/parserTests.inc b/maintenance/parserTests.inc index c34d6d5f50..0144998881 100644 --- a/maintenance/parserTests.inc +++ b/maintenance/parserTests.inc @@ -1591,7 +1591,7 @@ class TestFileIterator implements Iterator { function rewind() { if ( fseek( $this->fh, 0 ) ) { - wfDie( "Couldn't fseek to the start of '$filename'\n" ); + wfDie( "Couldn't fseek to the start of '$this->file'\n" ); } $this->index = -1; $this->lineNum = 0; @@ -1633,10 +1633,10 @@ class TestFileIterator implements Iterator { $section = strtolower( $matches[1] ); if ( $section == 'endarticle' ) { if ( !isset( $data['text'] ) ) { - wfDie( "'endarticle' without 'text' at line {$this->lineNum} of $filename\n" ); + wfDie( "'endarticle' without 'text' at line {$this->lineNum} of $this->file\n" ); } if ( !isset( $data['article'] ) ) { - wfDie( "'endarticle' without 'article' at line {$this->lineNum} of $filename\n" ); + wfDie( "'endarticle' without 'article' at line {$this->lineNum} of $this->file\n" ); } if ( $this->parser ) { $this->parser->addArticle( $this->parser->chomp( $data['article'] ), $this->parser->chomp( $data['text'] ), @@ -1648,7 +1648,7 @@ class TestFileIterator implements Iterator { } if ( $section == 'endhooks' ) { if ( !isset( $data['hooks'] ) ) { - wfDie( "'endhooks' without 'hooks' at line {$this->lineNum} of $filename\n" ); + wfDie( "'endhooks' without 'hooks' at line {$this->lineNum} of $this->file\n" ); } foreach ( explode( "\n", $data['hooks'] ) as $line ) { $line = trim( $line ); @@ -1662,7 +1662,7 @@ class TestFileIterator implements Iterator { } if ( $section == 'endfunctionhooks' ) { if ( !isset( $data['functionhooks'] ) ) { - wfDie( "'endfunctionhooks' without 'functionhooks' at line {$this->lineNum} of $filename\n" ); + wfDie( "'endfunctionhooks' without 'functionhooks' at line {$this->lineNum} of $this->file\n" ); } foreach ( explode( "\n", $data['functionhooks'] ) as $line ) { $line = trim( $line ); @@ -1676,13 +1676,13 @@ class TestFileIterator implements Iterator { } if ( $section == 'end' ) { if ( !isset( $data['test'] ) ) { - wfDie( "'end' without 'test' at line {$this->lineNum} of $filename\n" ); + wfDie( "'end' without 'test' at line {$this->lineNum} of $this->file\n" ); } if ( !isset( $data['input'] ) ) { - wfDie( "'end' without 'input' at line {$this->lineNum} of $filename\n" ); + wfDie( "'end' without 'input' at line {$this->lineNum} of $this->file\n" ); } if ( !isset( $data['result'] ) ) { - wfDie( "'end' without 'result' at line {$this->lineNum} of $filename\n" ); + wfDie( "'end' without 'result' at line {$this->lineNum} of $this->file\n" ); } if ( !isset( $data['options'] ) ) { $data['options'] = ''; @@ -1719,7 +1719,7 @@ class TestFileIterator implements Iterator { return true; } if ( isset ( $data[$section] ) ) { - wfDie( "duplicate section '$section' at line {$this->lineNum} of $filename\n" ); + wfDie( "duplicate section '$section' at line {$this->lineNum} of $this->file\n" ); } $data[$section] = ''; continue; -- 2.20.1