class CollationTest extends MediaWikiLangTestCase {
protected function setUp() {
parent::setUp();
- if ( !extension_loaded( 'intl' ) ) {
- $this->markTestSkipped( 'These tests require intl extension' );
- }
+ $this->checkPHPExtension( 'intl' );
}
/**
protected function setUp() {
parent::setUp();
- if ( !extension_loaded( 'xdiff' ) ) {
- $this->markTestSkipped( 'The xdiff extension is not available' );
+ $this->checkPHPExtension( 'hash' );
+ $this->checkPHPExtension( 'xdiff' );
- return;
- }
if ( !function_exists( 'xdiff_string_rabdiff' ) ) {
$this->markTestSkipped( 'The version of xdiff extension is lower than 1.5.0' );
- return;
- }
- if ( !extension_loaded( 'hash' ) ) {
- $this->markTestSkipped( 'The hash extension is not available' );
-
return;
}
}
* @covers BitmapMetadataHandler::Jpeg
*/
public function testMultilingualCascade() {
- if ( !extension_loaded( 'exif' ) ) {
- $this->markTestSkipped( "This test needs the exif extension." );
- }
- if ( !extension_loaded( 'xml' ) ) {
- $this->markTestSkipped( "This test needs the xml extension." );
- }
+ $this->checkPHPExtension( 'exif' );
+ $this->checkPHPExtension( 'xml' );
$this->setMwGlobals( 'wgShowEXIF', true );
protected function setUp() {
parent::setUp();
- if ( !extension_loaded( 'exif' ) ) {
- $this->markTestSkipped( "This test needs the exif extension." );
- }
+ $this->checkPHPExtension( 'exif' );
$this->setMwGlobals( 'wgShowEXIF', true );
protected function setUp() {
parent::setUp();
- if ( !extension_loaded( 'exif' ) ) {
- $this->markTestSkipped( "This test needs the exif extension." );
- }
+ $this->checkPHPExtension( 'exif' );
$this->handler = new BitmapHandler();
$filePath = __DIR__ . '/../../data/media';
protected function setUp() {
parent::setUp();
- if ( !extension_loaded( 'exif' ) ) {
- $this->markTestSkipped( "This test needs the exif extension." );
- }
+ $this->checkPHPExtension( 'exif' );
$this->mediaPath = __DIR__ . '/../../data/media/';
protected function setUp() {
parent::setUp();
- if ( !extension_loaded( 'exif' ) ) {
- $this->markTestSkipped( "This test needs the exif extension." );
- }
+ $this->checkPHPExtension( 'exif' );
$filePath = __DIR__ . '/../../data/media';
$this->backend = new FSFileBackend( array(
'name' => 'localtesting',
protected function setUp() {
parent::setUp();
- if ( !extension_loaded( 'exif' ) ) {
- $this->markTestSkipped( "This test needs the exif extension." );
- }
+ $this->checkPHPExtension( 'exif' );
$this->filePath = __DIR__ . '/../../data/media/';
protected function setUp() {
parent::setUp();
- if ( !extension_loaded( 'exif' ) ) {
- $this->markTestSkipped( "This test needs the exif extension." );
- }
+ $this->checkPHPExtension( 'exif' );
$this->setMwGlobals( 'wgShowEXIF', true );
protected function setUp() {
parent::setUp();
- if ( !extension_loaded( 'xml' ) ) {
- $this->markTestSkipped( 'Requires libxml to do XMP parsing' );
- }
+ $this->checkPHPExtension( 'exif' ); # Requires libxml to do XMP parsing
}
/**