'jpeg.jpg', 'nonexistant' => 'nonexisting.jpg', 'png' => 'png.png', 'xpm' => 'xpm.xpm', 'invalid' => 'text.txt', ); protected $expectedResults = array( 'testScaleBoth' => '194b23d2c0ba25f9e7709dbcf1dfa49f', 'testScaleDown' => 'f7c23414157666bd13f59016e524739d', 'testScaleUp' => 'ddf0c68313def12e876d57c634bf92f7', 'testScaleWidthBoth' => '150a84d65625b59f0f0ce599df6977db', 'testScaleWidthUp_1' => '902e24014b1d1490a94eaf89be5113a6', 'testScaleWidthUp_2' => '33a84244a4dbe99a6e69fe21f1bae6a4', 'testScaleWidthDown_1' => '902e24014b1d1490a94eaf89be5113a6', 'testScaleWidthDown_2' => '4850859d12d6acb12ba3d4488b2a80ee', 'testScaleHeightBoth' => 'a94cdc09c4071c812963b15b76d6c8c7', 'testScaleHeightUp_1' => '902e24014b1d1490a94eaf89be5113a6', 'testScaleHeightUp_2' => '902e24014b1d1490a94eaf89be5113a6', 'testScaleHeightDown_1' => '902e24014b1d1490a94eaf89be5113a6', 'testScaleHeightDown_2' => '902e24014b1d1490a94eaf89be5113a6', 'testScalePercent_1' => 'a94cdc09c4071c812963b15b76d6c8c7', 'testScalePercent_2' => '29814bd3aba32b5e4f0f09d980e55523', 'testScaleExact_1' => '29814bd3aba32b5e4f0f09d980e55523', 'testScaleExact_2' => '4904df5b10408bdc517be2150d706db4', 'testScaleExact_3' => '6963f30c3c8f69e3a86b4d6e3e65b4c6', 'testCrop_1' => '4904df5b10408bdc517be2150d706db4', 'testCrop_2' => '57d8e16a4a01131fbaecd519162aa095', 'testCrop_3' => 'a5c57f1480737ef298eecbfe4a4fc22e', 'testColorspaceGrey' => '57d8e16a4a01131fbaecd519162aa095', 'testColorspaceMonochrome' => '53bc6b9f9e012e875b27143bd3e29e21', 'testColorspaceSepia' => '1db4c3a057a2546dd56f0d61f8480911', /* 'testNoiseUniform' => 'bebc623c12180137e3db4028c9687c1e', 'testNoiseGaussian' => '214604cfc3a8179dcb396ac52d6703e9', 'testNoiseMultiplicative' => 'f69c7650df3d1749446c903bc2996543', 'testNoiseImpulse' => '2dfd0fe4aa170b078749f82a31e8ba96', 'testNoiseLaplacian' => 'c1c720e176debe6a3a36094bf896346b', 'testNoisePoisson' => '6e63737d286311fd83c1d381d022aa96', */ 'testSwirl_10' => '842f1639c9b2fad83765b1e36e5e66a3', 'testSwirl_50' => '6a55dfa03983bc1849664a7c0212c39b', 'testSwirl_100' => 'c84b8ef31597e64226a3785e5121fb28', 'testBorder_2' => 'e84cdc684fdc90d3a8bde7abde3538c0', 'testBorder_5' => 'f26ab77fc309e38fce4788aed70348a2', ); public static function suite() { return new ezcTestSuite( "ezcImageConversionFiltersShellTest" ); } /** * setUp * * @access public */ public function setUp() { $this->basePath = dirname( __FILE__ ) . '/data/'; $this->handler = new ezcImageImagemagickHandler( ezcImageImagemagickHandler::defaultSettings() ); $this->imageReference = $this->handler->load( $this->basePath . $this->testFiles['jpeg'] ); } /** * tearDown * * @access public */ public function tearDown() { unset( $this->handler ); } public function testScaleBoth() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->scale( 500, 500, ezcImageGeometryFilters::SCALE_BOTH ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testScaleDown() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->scale( 500, 2, ezcImageGeometryFilters::SCALE_DOWN ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testScaleUp() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->scale( 500, 2, ezcImageGeometryFilters::SCALE_UP ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testScaleWidthBoth() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->scaleWidth( 50, ezcImageGeometryFilters::SCALE_BOTH ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testScaleWidthUp_1() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->scaleWidth( 50, ezcImageGeometryFilters::SCALE_UP ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testScaleWidthUp_2() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->scaleWidth( 300, ezcImageGeometryFilters::SCALE_UP ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testScaleWidthDown_1() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->scaleWidth( 300, ezcImageGeometryFilters::SCALE_DOWN ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testScaleWidthDown_2() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->scaleWidth( 50, ezcImageGeometryFilters::SCALE_DOWN ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testScaleHeightBoth() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->scalePercent( 50, 50 ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testScaleHeightUp_1() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testScaleHeightUp_2() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testScaleHeightDown_1() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testScaleHeightDown_2() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testScalePercent_1() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->scalePercent( 50, 50 ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testScalePercent_2() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->scaleExact( 200, 200 ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testScaleExact_1() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->scaleExact( 200, 200 ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testScaleExact_2() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->crop( 50, 38, 100, 75 ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testScaleExact_3() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->scaleExact( 200, 10 ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testCrop_1() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->crop( 50, 38, 100, 75 ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testCrop_2() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->colorspace( ezcImageColorspaceFilters::COLORSPACE_GREY ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testCrop_3() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->crop( 50, 75, 250, 38 ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testColorspaceGrey() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->colorspace( ezcImageColorspaceFilters::COLORSPACE_GREY ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testColorspaceMonochrome() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->colorspace( ezcImageColorspaceFilters::COLORSPACE_MONOCHROME ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testColorspaceSepia() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->colorspace( ezcImageColorspaceFilters::COLORSPACE_SEPIA ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testNoiseUniform() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->noise( 'Uniform' ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertTrue( file_exists( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testNoiseGaussian() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->noise( 'Gaussian' ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertTrue( file_exists( $dstPath ), md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testNoiseMultiplicative() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->noise( 'Multiplicative' ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertTrue( file_exists( $dstPath ), md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testNoiseImpulse() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->noise( 'Impulse' ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertTrue( file_exists( $dstPath ), md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testNoiseLaplacian() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->noise( 'Laplacian' ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertTrue( file_exists( $dstPath ), md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testNoisePoisson() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->noise( 'Poisson' ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertTrue( file_exists( $dstPath ), md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testSwirl_10() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->swirl( 10 ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testSwirl_50() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->swirl( 50 ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testSwirl_100() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->swirl( 100 ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testBorder_2() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->border( 2, array( 0x00, 0x00, 0xFF ) ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } public function testBorder_5() { $dstPath = $this->createTempDir( str_replace( '::', '_', __METHOD__) . '_' ) . '/result'; $filters = new ezcImageImagemagickFilters( $this->handler ); $filters->border( 5, array( 255, 0, 0 ) ); $this->handler->save( $this->handler->getActiveReference(), $dstPath ); // echo "\n'".__FUNCTION__."' => '".md5_file( $dstPath )."',\n"; $this->assertEquals( $this->expectedResults[__FUNCTION__], md5_file( $dstPath ), 'Filter <'.__METHOD__.'> did not produce correct output.' ); $this->handler->close( $this->handler->getActiveReference() ); $this->removeTempDir(); } } ?>