From: Michael J. Rubinsky Date: Fri, 19 Feb 2010 15:11:45 +0000 (-0500) Subject: tests need the path to identify as well X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=5fb0cebbe31890a849e528d17a5a74ba4c53171c;p=horde.git tests need the path to identify as well --- diff --git a/framework/Image/tests/im.php b/framework/Image/tests/im.php index fd1b0930e..d16d3cad6 100644 --- a/framework/Image/tests/im.php +++ b/framework/Image/tests/im.php @@ -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); } diff --git a/framework/Image/tests/runtest.php b/framework/Image/tests/runtest.php index f5986b14b..3472807fd 100644 --- a/framework/Image/tests/runtest.php +++ b/framework/Image/tests/runtest.php @@ -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( EffectImImagick $description) { - echo '' . $description . '' . Horde::img('im.php?test=' . $name, '', '', '') . '' . - '' . Horde::img('im.php?test=' . $name . '&driver=Imagick', '', '', '') . ''; + echo '' . $description . '' . Horde::img('im.php?test=' . $name, '', '', '') . '' . ''; + //'' . Horde::img('im.php?test=' . $name . '&driver=Imagick', '', '', '') . ''; } echo ''; ?>