tests need the path to identify as well
authorMichael J. Rubinsky <mrubinsk@horde.org>
Fri, 19 Feb 2010 15:11:45 +0000 (10:11 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Fri, 19 Feb 2010 15:12:52 +0000 (10:12 -0500)
framework/Image/tests/im.php
framework/Image/tests/runtest.php

index fd1b093..d16d3ca 100644 (file)
@@ -16,6 +16,7 @@ $db = $GLOBALS['injector']->getInstance('Horde_Db_Adapter_Base');
 $driver = Horde_Util::getFormData('driver', 'Im');
 $test = Horde_Util::getFormData('test');
 $convert = trim(`which convert`);
+$identify = trim(`which identify`);
 $handler = new Horde_Log_Handler_Stream(fopen('/tmp/imagetest.log','a+'));
 $logger = new Horde_Log_Logger($handler);
 
@@ -24,6 +25,7 @@ switch ($test) {
 case 'multipage':
     $time = xdebug_time_index();
     $image = getImageObject(array('filename' => 'two_page.tif.tiff'));
+
     $first = true;
     foreach ($image as $index => $imObject) {
         if (!$first) {
@@ -418,7 +420,7 @@ case 'testPolaroidstackBlueBG':
  *
  * @param array $params  Any additional parameters
  *
- * @return Horde_Image object | PEAR_Error
+ * @return Horde_Image_Base object | PEAR_Error
  */
 function getImageObject($params = array())
 {
@@ -426,7 +428,9 @@ function getImageObject($params = array())
 
     // Always pass the convert parameter to be consistent when profiling.
     $context = array('tmpdir' => Horde::getTempDir(),
-                     'convert' => $GLOBALS['convert']);
+                     'convert' => $GLOBALS['convert'],
+                     'logger' => $GLOBALS['logger'],
+                     'identify' => $GLOBALS['identify']);
     $params['context'] = $context;
     return Horde_Image::factory($GLOBALS['driver'], $params);
 }
index f5986b1..3472807 100644 (file)
@@ -7,28 +7,28 @@ require_once dirname(__FILE__) . '/../../../horde/lib/Application.php';
 Horde_Registry::appInit('horde', array('authentication' => 'none'));
 
 $allTests = array(
-    'testInitialState' => 'Test initial state. Solid blue square',
-    'testPrimitivesTransparentBG' => 'Transparent background, various primitives. Cirlce should be above the rectangles.',
-    'testTransparentBGWithBorder' => 'Test transparent background with border preserving transparency.',
-    'testTransparentPrimitivesReversed' => 'Test ordering of primitives. This should show the circle *below* the rectangles.',
-    'testAnnotateImage' => 'Annotate Image with Hello World in center left',
-    'testPolylineCircleLineText' => 'various other primitives, as well as state of stroke color, width etc...',
-    'testRoundCorners' => 'Rounded corners with transparent background.',
-    'testRoundCornersRedBG' => 'Rounded corners with red background.',
-    'testRoundCornersDropShadowTransparentBG' => 'Rounded corners with a drop shadow on a transparent background.',
-    'testRoundCornersDropShadowYellowBG' => 'Rounded corners, with a drop shadow on a yellow background',
-    'testBorderedDropShadowTransparentBG' => 'Thumbnail with border and drop shadow over a transparent background.',
-    'testBorderedDropShadowBlueBG' => 'Thumbnail with border, drop shadow over a blue background.',
-    'testPolaroidTransparentBG' => 'Polaroid effect with transparent background.',
-    'testPolaroidBlueBG' => 'Polaroid effect with blue background.',
-    'testPlainstackTransparentBG' => 'Thumbnail stack on transparent background.',
-    'testPlainstackBlueBG' => 'Thumbnail stack on a blue background.',
-    'testRoundstackTransparentBG' => 'Thumbnail stack with rounded borders on a transparent background',
-    'testRoundstackBlueBG' => 'Thumbnail stack, rounded corners on a blue background',
-    'testPolaroidstackTransparentBG' => 'Polaroid stack on a transparent background.',
-    'testPolaroidstackBlueBG' => 'Polaroid stack on a blue background',
-    //'testInitialStateAfterLoad' => 'Initial state after loading an existing image.',
-    'testResize' => 'Test resize method.',
+//    'testInitialState' => 'Test initial state. Solid blue square',
+//    'testPrimitivesTransparentBG' => 'Transparent background, various primitives. Cirlce should be above the rectangles.',
+//    'testTransparentBGWithBorder' => 'Test transparent background with border preserving transparency.',
+//    'testTransparentPrimitivesReversed' => 'Test ordering of primitives. This should show the circle *below* the rectangles.',
+//    'testAnnotateImage' => 'Annotate Image with Hello World in center left',
+//    'testPolylineCircleLineText' => 'various other primitives, as well as state of stroke color, width etc...',
+//    'testRoundCorners' => 'Rounded corners with transparent background.',
+//    'testRoundCornersRedBG' => 'Rounded corners with red background.',
+//    'testRoundCornersDropShadowTransparentBG' => 'Rounded corners with a drop shadow on a transparent background.',
+//    'testRoundCornersDropShadowYellowBG' => 'Rounded corners, with a drop shadow on a yellow background',
+//    'testBorderedDropShadowTransparentBG' => 'Thumbnail with border and drop shadow over a transparent background.',
+//    'testBorderedDropShadowBlueBG' => 'Thumbnail with border, drop shadow over a blue background.',
+//    'testPolaroidTransparentBG' => 'Polaroid effect with transparent background.',
+//    'testPolaroidBlueBG' => 'Polaroid effect with blue background.',
+//    'testPlainstackTransparentBG' => 'Thumbnail stack on transparent background.',
+//    'testPlainstackBlueBG' => 'Thumbnail stack on a blue background.',
+//    'testRoundstackTransparentBG' => 'Thumbnail stack with rounded borders on a transparent background',
+//    'testRoundstackBlueBG' => 'Thumbnail stack, rounded corners on a blue background',
+//    'testPolaroidstackTransparentBG' => 'Polaroid stack on a transparent background.',
+//    'testPolaroidstackBlueBG' => 'Polaroid stack on a blue background',
+//    //'testInitialStateAfterLoad' => 'Initial state after loading an existing image.',
+//    'testResize' => 'Test resize method.',
     'multipage' => 'Test Multipage tiffs',
 );
 ?>
@@ -41,8 +41,8 @@ $allTests = array(
  <thead><td>Effect</td><td>Im</td><td>Imagick</td></thead>
 <?php
 foreach ($allTests as $name => $description) {
-    echo '<tr><td text-align="top">' . $description . '</td><td>' . Horde::img('im.php?test=' . $name, '', '', '') . '</td>' .
-      '<td text-align="top">' . Horde::img('im.php?test=' . $name . '&driver=Imagick', '', '', '') . '</td></tr>';
+    echo '<tr><td text-align="top">' . $description . '</td><td>' . Horde::img('im.php?test=' . $name, '', '', '') . '</td>' . '</tr>';
+      //'<td text-align="top">' . Horde::img('im.php?test=' . $name . '&driver=Imagick', '', '', '') . '</td></tr>';
 }
 echo '</table>';
 ?></body></html>