try {
$randomImageGenerator = new RandomImageGenerator();
+ $filePaths = $randomImageGenerator->writeImages( 1, $extension, wfTempDir() );
}
catch ( Exception $e ) {
$this->markTestIncomplete( $e->getMessage() );
}
- $filePaths = $randomImageGenerator->writeImages( 1, $extension, wfTempDir() );
$filePath = $filePaths[0];
$fileSize = filesize( $filePath );
$fileName = basename( $filePath );
try {
$randomImageGenerator = new RandomImageGenerator();
+ $filePaths = $randomImageGenerator->writeImages( 2, $extension, wfTempDir() );
}
catch ( Exception $e ) {
$this->markTestIncomplete( $e->getMessage() );
}
- $filePaths = $randomImageGenerator->writeImages( 2, $extension, wfTempDir() );
// we'll reuse this filename
$fileName = basename( $filePaths[0] );
try {
$randomImageGenerator = new RandomImageGenerator();
+ $filePaths = $randomImageGenerator->writeImages( 1, $extension, wfTempDir() );
}
catch ( Exception $e ) {
$this->markTestIncomplete( $e->getMessage() );
}
- $filePaths = $randomImageGenerator->writeImages( 1, $extension, wfTempDir() );
+
$fileNames[0] = basename( $filePaths[0] );
$fileNames[1] = "SameContentAs" . $fileNames[0];
try {
$randomImageGenerator = new RandomImageGenerator();
+ $filePaths = $randomImageGenerator->writeImages( 1, $extension, wfTempDir() );
}
catch ( Exception $e ) {
$this->markTestIncomplete( $e->getMessage() );
}
- $filePaths = $randomImageGenerator->writeImages( 1, $extension, wfTempDir() );
$filePath = $filePaths[0];
$fileSize = filesize( $filePath );
$fileName = basename( $filePath );
if ( !isset( $this->dictionaryFile ) ) {
throw new Exception( "RandomImageGenerator: dictionary file not found or not specified properly" );
}
-
- if ( !class_exists( 'Imagick' ) ) {
- throw new Exception( 'No Imagick extension' );
- }
- global $wgExiv2Command;
- if ( !$wgExiv2Command || !is_executable( $wgExiv2Command ) ) {
- throw new Exception( 'exiv2 not executable or $wgExiv2Command not set' );
- }
}
/**
return 'writeSvg';
} else {
// figure out how to write images
- if ( class_exists( 'Imagick' ) ) {
+ global $wgExiv2Command;
+ if ( class_exists( 'Imagick' ) && $wgExiv2Command && is_executable( $wgExiv2Command ) ) {
return 'writeImageWithApi';
} elseif ( $wgUseImageMagick && $wgImageMagickConvertCommand && is_executable( $wgImageMagickConvertCommand ) ) {
return 'writeImageWithCommandLine';
if ( $retval !== 0 ) {
print "Error with $cmd: $retval, $err\n";
}
- }
-
-
+ }
}
/**