Index: trunk/extensions/PagedTiffHandler/tests/PagedTiffHandlerTest.php |
— | — | @@ -1,12 +1,18 @@ |
2 | 2 | <?php |
3 | 3 | /** To get this working you must |
4 | 4 | * - set a valid path to PEAR |
5 | | -* - Upload the image Caspian.tif without PagedTiffHandler being active |
| 5 | +* - check upload size in php.ini: Multipage.tiff needs at least 3M |
| 6 | +* - Upload the image caspian.tif without PagedTiffHandler being active |
6 | 7 | * - Upload multipage.tiff when PagedTiffHandler is active |
7 | 8 | */ |
8 | 9 | |
9 | | -require_once( dirname(__FILE__) . '/../../../maintenance/commandLine.inc' ); |
10 | | -ini_set( 'include_path', get_include_path() . PATH_SEPARATOR . /*$_SERVER['PHP_PEAR_INSTALL_DIR']*/ 'C:\php\pear' ); |
| 10 | +try { |
| 11 | + require_once( dirname(__FILE__) . '/../../../maintenance/commandLine.inc' ); |
| 12 | +} |
| 13 | +catch(Exception $e) { |
| 14 | + require_once( dirname(__FILE__) . '/../../../phase3/maintenance/commandLine.inc' ); |
| 15 | +} |
| 16 | +// ini_set( 'include_path', get_include_path() . PATH_SEPARATOR . /*$_SERVER['PHP_PEAR_INSTALL_DIR']*/ 'C:\php\pear' ); |
11 | 17 | // requires PHPUnit 3.4 |
12 | 18 | require_once 'PHPUnit/Framework.php'; |
13 | 19 | |
— | — | @@ -15,6 +21,7 @@ |
16 | 22 | |
17 | 23 | private $handler; |
18 | 24 | private $image; |
| 25 | + private $preCheckError; |
19 | 26 | |
20 | 27 | function setUp() |
21 | 28 | { |
— | — | @@ -32,7 +39,7 @@ |
33 | 40 | } |
34 | 41 | if (!file_exists(dirname(__FILE__) . '/testImages/multipage.tiff')) |
35 | 42 | { |
36 | | - echo "testImages/Multitest_2.tif cannot be found.\n"; |
| 43 | + echo "testImages/Multipage.tif cannot be found.\n"; |
37 | 44 | $this->preCheckError = true; |
38 | 45 | } |
39 | 46 | if (!file_exists( dirname(__FILE__) . '/testImages')) |