r84346 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84345‎ | r84346 | r84347 >
Date:21:10, 19 March 2011
Author:reedy
Status:ok
Tags:
Comment:
Fixup tests to match input a bit better
Modified paths:
  • /trunk/extensions/CodeReview/tests/CodeReviewTest.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/tests/CodeReviewTest.php
@@ -7,7 +7,7 @@
88 $row->repo_name = 'Test';
99 $row->repo_path = 'somewhere';
1010 $row->repo_viewvc = 'http://example.com/view/';
11 - $row->repo_bugzilla = 'http://example.com/bugzilla/$1';
 11+ $row->repo_bugzilla = 'http://example.com/$1';
1212
1313 return CodeRepository::newFromRow( $row );
1414 }
@@ -17,7 +17,7 @@
1818 $formatter = new CodeCommentLinkerWiki( $repo );
1919
2020 $this->assertEquals( '[http://foo http://foo]', $formatter->link( 'http://foo' ) );
21 - $this->assertEquals( '[http://example.com/bugzilla/123 bug 123]', $formatter->link( 'bug 123' ) );
 21+ $this->assertEquals( '[http://example.com/123 bug 123]', $formatter->link( 'bug 123' ) );
2222 $this->assertEquals( '[[Special:Code/Test/456|r456]]', $formatter->link( 'r456' ) );
2323
2424 // fails, 18614
@@ -26,16 +26,18 @@
2727 // $this->assertEquals( '[[bugzilla:19359|bug 19359]]', $formatter->link( '[[bugzilla:19359|bug 19359]]' ) );
2828
2929 // fails, bug 19299
30 - // $this->assertEquals( '[http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75762#code-comments r75762 CR comments]',
31 - // $formatter->link( [http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75762#code-comments r75762 CR comments]' ) );
 30+ $this->assertEquals( '[http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75762#code-comments r75762 CR comments]',
 31+ $formatter->link( '[http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75762#code-comments r75762 CR comments]' ) );
3232
3333 // fails, bug 24279
3434 // $this->assertEquals( '[http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/api/ApiUpload.php?pathrev=70049&r1=70048&r2=70049 ViewVC]',
3535 // $formatter->link( '[http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/api/ApiUpload.php?pathrev=70049&r1=70048&r2=70049 ViewVC]' ) );
3636 // $this->assertEquals( '<nowiki>bug 24027</nowiki>', $formatter->link( '<nowiki>bug 24027</nowiki>' ) );
37 - // $this->assertEquals( 'http://bugzilla.org/13518#c9', $formatter->link( 'bug 13518#c9' ) );
38 - // $this->assertEquals( 'http://bugzilla.org/13518#c9', $formatter->link( 'bug 13518 comment 9' ) );
 37+ // $this->assertEquals( 'http://example.com/13518#c9', $formatter->link( 'bug 13518#c9' ) );
 38+ // $this->assertEquals( 'http://example.com/13518#c9', $formatter->link( 'bug 13518 comment 9' ) );
3939
 40+ // $this->assertEquals( '[[Special:Code/Test/10234#c5]]', $formatter->link( 'r10234#c5' ) );
 41+
4042 // $this->assertEquals( '', $formatter->link( '' ) );
4143 }
4244 }
\ No newline at end of file

Status & tagging log