diff options
author | Chad Horohoe <demon@users.mediawiki.org> | 2010-12-14 16:26:35 +0000 |
---|---|---|
committer | Chad Horohoe <demon@users.mediawiki.org> | 2010-12-14 16:26:35 +0000 |
commit | 23f69f10ed07c7fbe7d752882a88d55351ce2e3d (patch) | |
tree | 43054aea852645def63951fcbf45eb2cf2551adb /tests/phpunit/includes/api/generateRandomImages.php | |
parent | 5903e492a5c60f65182d6339f63693aa2dca92f0 (diff) | |
download | mediawikicore-23f69f10ed07c7fbe7d752882a88d55351ce2e3d.tar.gz mediawikicore-23f69f10ed07c7fbe7d752882a88d55351ce2e3d.zip |
Per wikitech-l discussion: Move tests from maintenance/tests/ to tests/. They're not strictly maintenance scripts, and some people want to do a selective checkout that doesn't include the tests. There's still debate on whether we should include these in the release downloads, but we had a pretty firm consensus to move this.
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/78383
Diffstat (limited to 'tests/phpunit/includes/api/generateRandomImages.php')
-rw-r--r-- | tests/phpunit/includes/api/generateRandomImages.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/phpunit/includes/api/generateRandomImages.php b/tests/phpunit/includes/api/generateRandomImages.php new file mode 100644 index 000000000000..cab1ec7de65b --- /dev/null +++ b/tests/phpunit/includes/api/generateRandomImages.php @@ -0,0 +1,25 @@ +<?php + +require("RandomImageGenerator.php"); + +$getOptSpec = array( + 'dictionaryFile::', + 'minWidth::', + 'maxWidth::', + 'minHeight::', + 'maxHeight::', + 'circlesToDraw::', + + 'number::', + 'format::' +); +$options = getopt( null, $getOptSpec ); + +$format = isset( $options['format'] ) ? $options['format'] : 'jpg'; +unset( $options['format'] ); + +$number = isset( $options['number'] ) ? intval( $options['number'] ) : 10; +unset( $options['number'] ); + +$randomImageGenerator = new RandomImageGenerator( $options ); +$randomImageGenerator->writeImages( $number, $format ); |