Index: trunk/phase3/maintenance/tests/phpunit/includes/ParserOptionsTest.php |
— | — | @@ -17,8 +17,9 @@ |
18 | 18 | parent::tearDown(); |
19 | 19 | } |
20 | 20 | |
21 | | - /* |
| 21 | + /** |
22 | 22 | * ParserOptions::optionsHash was not giving consistent results when $wgUseDynamicDates was set |
| 23 | + * @group Database |
23 | 24 | */ |
24 | 25 | function testGetParserCacheKeyWithDynamicDates() { |
25 | 26 | global $wgUseDynamicDates; |
Index: trunk/phase3/maintenance/tests/phpunit/includes/api/ApiUploadTest.php |
— | — | @@ -30,17 +30,17 @@ |
31 | 31 | function __construct( $username, $realname = 'Real Name', $email = 'sample@sample.com', $groups = array() ) { |
32 | 32 | global $wgMinimalPasswordLength; |
33 | 33 | |
34 | | - $this->username = $username; |
35 | | - $this->realname = $realname; |
| 34 | + $this->username = $username; |
| 35 | + $this->realname = $realname; |
36 | 36 | $this->email = $email; |
37 | 37 | $this->groups = $groups; |
38 | 38 | |
39 | 39 | // don't allow user to hardcode or select passwords -- people sometimes run tests |
40 | 40 | // on live wikis. Sometimes we create sysop users in these tests. A sysop user with |
41 | 41 | // a known password would be a Bad Thing. |
42 | | - $this->password = User::randomPassword(); |
| 42 | + $this->password = User::randomPassword(); |
43 | 43 | |
44 | | - $this->user = User::newFromName( $this->username ); |
| 44 | + $this->user = User::newFromName( $this->username ); |
45 | 45 | $this->user->load(); |
46 | 46 | |
47 | 47 | // In an ideal world we'd have a new wiki (or mock data store) for every single test. |
— | — | @@ -145,6 +145,10 @@ |
146 | 146 | |
147 | 147 | } |
148 | 148 | |
| 149 | +/** |
| 150 | + * @group Database |
| 151 | + * @group Destructive |
| 152 | + */ |
149 | 153 | class ApiUploadTest extends ApiTestCase { |
150 | 154 | /** |
151 | 155 | * Fixture -- run before every test |
— | — | @@ -254,7 +258,13 @@ |
255 | 259 | $extension = 'png'; |
256 | 260 | $mimeType = 'image/png'; |
257 | 261 | |
258 | | - $randomImageGenerator = new RandomImageGenerator(); |
| 262 | + try { |
| 263 | + $randomImageGenerator = new RandomImageGenerator(); |
| 264 | + } |
| 265 | + catch ( Exception $e ) { |
| 266 | + $this->markTestIncomplete( $e->getMessage() ); |
| 267 | + } |
| 268 | + |
259 | 269 | $filePaths = $randomImageGenerator->writeImages( 1, $extension, dirname( wfTempDir() ) ); |
260 | 270 | $filePath = $filePaths[0]; |
261 | 271 | $fileName = basename( $filePath ); |
— | — | @@ -342,7 +352,13 @@ |
343 | 353 | $extension = 'png'; |
344 | 354 | $mimeType = 'image/png'; |
345 | 355 | |
346 | | - $randomImageGenerator = new RandomImageGenerator(); |
| 356 | + try { |
| 357 | + $randomImageGenerator = new RandomImageGenerator(); |
| 358 | + } |
| 359 | + catch ( Exception $e ) { |
| 360 | + $this->markTestIncomplete( $e->getMessage() ); |
| 361 | + } |
| 362 | + |
347 | 363 | $filePaths = $randomImageGenerator->writeImages( 2, $extension, dirname( wfTempDir() ) ); |
348 | 364 | // we'll reuse this filename |
349 | 365 | $fileName = basename( $filePaths[0] ); |
— | — | @@ -410,7 +426,12 @@ |
411 | 427 | $extension = 'png'; |
412 | 428 | $mimeType = 'image/png'; |
413 | 429 | |
414 | | - $randomImageGenerator = new RandomImageGenerator(); |
| 430 | + try { |
| 431 | + $randomImageGenerator = new RandomImageGenerator(); |
| 432 | + } |
| 433 | + catch ( Exception $e ) { |
| 434 | + $this->markTestIncomplete( $e->getMessage() ); |
| 435 | + } |
415 | 436 | $filePaths = $randomImageGenerator->writeImages( 1, $extension, dirname( wfTempDir() ) ); |
416 | 437 | $fileNames[0] = basename( $filePaths[0] ); |
417 | 438 | $fileNames[1] = "SameContentAs" . $fileNames[0]; |
— | — | @@ -488,7 +509,13 @@ |
489 | 510 | $extension = 'png'; |
490 | 511 | $mimeType = 'image/png'; |
491 | 512 | |
492 | | - $randomImageGenerator = new RandomImageGenerator(); |
| 513 | + try { |
| 514 | + $randomImageGenerator = new RandomImageGenerator(); |
| 515 | + } |
| 516 | + catch ( Exception $e ) { |
| 517 | + $this->markTestIncomplete( $e->getMessage() ); |
| 518 | + } |
| 519 | + |
493 | 520 | $filePaths = $randomImageGenerator->writeImages( 1, $extension, dirname( wfTempDir() ) ); |
494 | 521 | $filePath = $filePaths[0]; |
495 | 522 | $fileName = basename( $filePath ); |