Index: trunk/extensions/PagedTiffHandler/tests/PagedTiffHandlerTest.php |
— | — | @@ -232,9 +232,13 @@ |
233 | 233 | // ---- File upload checks and Thumbnail transformation |
234 | 234 | // check |
235 | 235 | // TODO: check other images |
236 | | - $this->assertTrue( $this->handler->check( 'multipage.tiff', $this->multipage_path, $error ) ); |
237 | | - $this->assertFalse( $this->handler->check( 'Truncated.tiff', $this->truncated_path, $error ) ); |
238 | | - $this->assertEquals( $error, 'tiff_bad_file' ); |
| 236 | + $status = $this->handler->verifyUpload( $this->multipage_path ); |
| 237 | + $this->assertTrue( $status->isGood() ); |
| 238 | + |
| 239 | + $status = $this->handler->verifyUpload( $this->truncated_path ); |
| 240 | + $this->assertFalse( $status->isGood() ); |
| 241 | + $this->assertTrue( $status->hasMessage( 'tiff_bad_file' ) ); |
| 242 | + |
239 | 243 | // doTransform |
240 | 244 | $this->handler->doTransform( $this->multipage_image, $this->test_path, 'Test.tif', array( 'width' => 100, 'height' => 100 ) ); |
241 | 245 | $error = $this->handler->doTransform( wfFindFile( Title::newFromText( 'Image:Truncated.tiff' ) ), $this->truncated_path, 'Truncated.tiff', array( 'width' => 100, 'height' => 100 ) ); |