r75803 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75802‎ | r75803 | r75804 >
Date:17:28, 1 November 2010
Author:platonides
Status:ok
Tags:
Comment:
Add a new group destructive.
Spacing.
Modified paths:
  • /trunk/phase3/maintenance/tests/phpunit/includes/SampleTest.php (modified) (history)
  • /trunk/phase3/maintenance/tests/phpunit/includes/api/ApiSetup.php (modified) (history)
  • /trunk/phase3/maintenance/tests/phpunit/includes/api/ApiTest.php (modified) (history)
  • /trunk/phase3/maintenance/tests/phpunit/includes/api/ApiWatchTest.php (modified) (history)
  • /trunk/phase3/maintenance/tests/phpunit/suites/ExtensionsTestSuite.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/tests/phpunit/includes/SampleTest.php
@@ -88,8 +88,8 @@
8989 * See http://www.phpunit.de/manual/3.4/en/appendixes.annotations.html#appendixes.annotations.expectedException
9090 */
9191 function testTitleObjectFromObject() {
92 - $title = Title::newFromText(new Title("test"));
 92+ $title = Title::newFromText( new Title( "test" ) );
9393 $this->assertEquals( "Test", $title->isLocal() );
9494 }
95 - }
 95+}
9696
Index: trunk/phase3/maintenance/tests/phpunit/includes/api/ApiTest.php
@@ -17,6 +17,9 @@
1818 }
1919 }
2020
 21+/**
 22+ * @group destructive
 23+ */
2124 class ApiTest extends ApiTestSetup {
2225
2326 function testRequireOnlyOneParameterDefault() {
@@ -28,8 +31,8 @@
2932 }
3033
3134 /**
32 - * @expectedException UsageException
33 - */
 35+ * @expectedException UsageException
 36+ */
3437 function testRequireOnlyOneParameterZero() {
3538 $mock = new MockApi();
3639
@@ -39,8 +42,8 @@
4043 }
4144
4245 /**
43 - * @expectedException UsageException
44 - */
 46+ * @expectedException UsageException
 47+ */
4548 function testRequireOnlyOneParameterTrue() {
4649 $mock = new MockApi();
4750
Index: trunk/phase3/maintenance/tests/phpunit/includes/api/ApiSetup.php
@@ -51,9 +51,9 @@
5252
5353 public function __construct( $userName, $password, $group = '' ) {
5454 $this->userName = $userName;
55 - $this->password = $password;
 55+ $this->password = $password;
5656
57 - $this->user = User::newFromName( $this->userName );
 57+ $this->user = User::newFromName( $this->userName );
5858 if ( !$this->user->getID() ) {
5959 $this->user = User::createNew( $this->userName, array(
6060 "email" => "test@example.com",
Index: trunk/phase3/maintenance/tests/phpunit/includes/api/ApiWatchTest.php
@@ -2,6 +2,9 @@
33
44 require_once dirname( __FILE__ ) . '/ApiSetup.php';
55
 6+/**
 7+ * @group destructive
 8+ */
69 class ApiWatchTest extends ApiTestSetup {
710
811 function setUp() {
Index: trunk/phase3/maintenance/tests/phpunit/suites/ExtensionsTestSuite.php
@@ -4,7 +4,7 @@
55 * See http://www.mediawiki.org/wiki/Manual:Hooks/UnitTestsList for details of how to register your tests.
66 */
77
8 - class ExtensionsTestSuite extends PHPUnit_Framework_TestSuite {
 8+class ExtensionsTestSuite extends PHPUnit_Framework_TestSuite {
99 public function __construct() {
1010 parent::__construct();
1111 $files = array();

Status & tagging log