Index: trunk/phase3/maintenance/tests/phpunit/includes/api/ApiTest.php |
— | — | @@ -87,12 +87,14 @@ |
88 | 88 | function testApiLoginBadPass() { |
89 | 89 | global $wgServer; |
90 | 90 | |
| 91 | + $user = self::$sysopUser; |
| 92 | + |
91 | 93 | if ( !isset( $wgServer ) ) { |
92 | 94 | $this->markTestIncomplete( 'This test needs $wgServer to be set in LocalSettings.php' ); |
93 | 95 | } |
94 | 96 | $ret = $this->doApiRequest( array( |
95 | 97 | "action" => "login", |
96 | | - "lgname" => self::$sysopUser->userName, |
| 98 | + "lgname" => $user->userName, |
97 | 99 | "lgpassword" => "bad", |
98 | 100 | ) |
99 | 101 | ); |
— | — | @@ -108,7 +110,7 @@ |
109 | 111 | $ret = $this->doApiRequest( array( |
110 | 112 | "action" => "login", |
111 | 113 | "lgtoken" => $token, |
112 | | - "lgname" => self::$sysopUser->userName, |
| 114 | + "lgname" => $user->userName, |
113 | 115 | "lgpassword" => "bad", |
114 | 116 | ) |
115 | 117 | ); |
— | — | @@ -128,10 +130,12 @@ |
129 | 131 | $this->markTestIncomplete( 'This test needs $wgServer to be set in LocalSettings.php' ); |
130 | 132 | } |
131 | 133 | |
| 134 | + $user = self::$sysopUser; |
| 135 | + |
132 | 136 | $ret = $this->doApiRequest( array( |
133 | 137 | "action" => "login", |
134 | | - "lgname" => self::$user->userName, |
135 | | - "lgpassword" => self::$user->password, |
| 138 | + "lgname" => $user->userName, |
| 139 | + "lgpassword" => $user->password, |
136 | 140 | ) |
137 | 141 | ); |
138 | 142 | |
— | — | @@ -146,8 +150,8 @@ |
147 | 151 | $ret = $this->doApiRequest( array( |
148 | 152 | "action" => "login", |
149 | 153 | "lgtoken" => $token, |
150 | | - "lgname" => self::$user->userName, |
151 | | - "lgpassword" => self::$user->password, |
| 154 | + "lgname" => $user->userName, |
| 155 | + "lgpassword" => $user->password, |
152 | 156 | ) |
153 | 157 | ); |
154 | 158 | |