Index: trunk/extensions/CodeReview/tests/CodeReviewTest.php |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | $row->repo_name = 'Test'; |
9 | 9 | $row->repo_path = 'somewhere'; |
10 | 10 | $row->repo_viewvc = 'http://example.com/view/'; |
11 | | - $row->repo_bugzilla = 'http://example.com/bugzilla/$1'; |
| 11 | + $row->repo_bugzilla = 'http://example.com/$1'; |
12 | 12 | |
13 | 13 | return CodeRepository::newFromRow( $row ); |
14 | 14 | } |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | $formatter = new CodeCommentLinkerWiki( $repo ); |
19 | 19 | |
20 | 20 | $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' ) ); |
22 | 22 | $this->assertEquals( '[[Special:Code/Test/456|r456]]', $formatter->link( 'r456' ) ); |
23 | 23 | |
24 | 24 | // fails, 18614 |
— | — | @@ -26,16 +26,18 @@ |
27 | 27 | // $this->assertEquals( '[[bugzilla:19359|bug 19359]]', $formatter->link( '[[bugzilla:19359|bug 19359]]' ) ); |
28 | 28 | |
29 | 29 | // 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]' ) ); |
32 | 32 | |
33 | 33 | // fails, bug 24279 |
34 | 34 | // $this->assertEquals( '[http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/api/ApiUpload.php?pathrev=70049&r1=70048&r2=70049 ViewVC]', |
35 | 35 | // $formatter->link( '[http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/api/ApiUpload.php?pathrev=70049&r1=70048&r2=70049 ViewVC]' ) ); |
36 | 36 | // $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' ) ); |
39 | 39 | |
| 40 | + // $this->assertEquals( '[[Special:Code/Test/10234#c5]]', $formatter->link( 'r10234#c5' ) ); |
| 41 | + |
40 | 42 | // $this->assertEquals( '', $formatter->link( '' ) ); |
41 | 43 | } |
42 | 44 | } |
\ No newline at end of file |