r75276 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75275‎ | r75276 | r75277 >
Date:17:28, 23 October 2010
Author:mah
Status:ok
Tags:
Comment:
Update documentation a bit more.
Modified paths:
  • /trunk/phase3/maintenance/tests/phpunit/includes/SampleTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/tests/phpunit/includes/SampleTest.php
@@ -26,7 +26,7 @@
2727
2828 /**
2929 * If you want to run a the same test with a variety of data. use a data provider.
30 - * See: http://www.phpunit.de/manual/3.4/en/writing-tests-for-phpunit.html
 30+ * see: http://www.phpunit.de/manual/3.4/en/writing-tests-for-phpunit.html
3131 */
3232 public function provideTitles() {
3333 return array(
@@ -40,6 +40,7 @@
4141
4242 /**
4343 * @dataProvider provideTitles()
 44+ * See http://www.phpunit.de/manual/3.4/en/appendixes.annotations.html#appendixes.annotations.dataProvider
4445 */
4546 public function testTitleCreation($titleName, $ns, $text) {
4647 $title = Title::newFromText($titleName, $ns);
@@ -66,17 +67,20 @@
6768 */
6869 /**
6970 * @depends testInitialCreation
 71+ * See http://www.phpunit.de/manual/3.4/en/appendixes.annotations.html#appendixes.annotations.depends
7072 */
7173 public function testTitleDepends( $title ) {
7274 $this->assertTrue( $title->isLocal() );
7375 }
7476
7577 /**
 78+ * If the code you're testing can produce Exceptions, you can also
 79+ * test for them. In the following example, the test expects a
 80+ * MWException containing the string "object" in the message..
 81+ */
 82+ /**
7683 * @expectedException MWException object
77 - *
78 - * Above comment tells PHPUnit to expect an exception of the
79 - * MWException class containing the string "object" in the
80 - * message.
 84+ * See http://www.phpunit.de/manual/3.4/en/appendixes.annotations.html#appendixes.annotations.expectedException
8185 */
8286 function testException() {
8387 $title = Title::newFromText(new Title("test"));

Status & tagging log