Author: Tobias Schlitt Date: 2006-09-27 15:04:56 +0200 (Wed, 27 Sep 2006) New Revision: 3601
Log: - Place ezcImageHandler->close() above asserts to avoid temporary file garbage. Modified: trunk/ImageConversion/tests/handlershell_test.php Modified: trunk/ImageConversion/tests/handlershell_test.php =================================================================== --- trunk/ImageConversion/tests/handlershell_test.php 2006-09-27 13:03:42 UTC (rev 3600) +++ trunk/ImageConversion/tests/handlershell_test.php 2006-09-27 13:04:56 UTC (rev 3601) @@ -27,7 +27,7 @@ return new ezcTestSuite( "ezcImageConversionHandlerShellTest" ); } - protected function setUp() + public function setUp() { try { @@ -51,6 +51,7 @@ $refProp = $this->getReferences(); $imageRef = current( $refProp ); + $this->handler->close( $ref ); $this->assertSame( $filePath, $imageRef["file"], @@ -63,7 +64,6 @@ "Image reference not registered correctly." ); - $this->handler->close( $ref ); } public function testLoadFailureFilenotexists() @@ -105,13 +105,13 @@ $ref = $this->handler->load( $srcPath ); $this->handler->applyFilter( $ref, new ezcImageFilter( "scale", array( "width" => 200, "height" => 200, "direction" => ezcImageGeometryFilters::SCALE_BOTH ) ) ); $this->handler->save( $ref, $dstPath ); + $this->handler->close( $ref ); $this->assertImageSimilar( $this->getReferencePath(), $dstPath, "Applying single filter through handler failed.", ezcImageConversionTestCase::DEFAULT_SIMILARITY_GAP ); - $this->handler->close( $ref ); } public function testApplyFilterMultiple() @@ -127,6 +127,7 @@ $this->handler->save( $ref, $dstPath ); + $this->handler->close( $ref ); $this->assertImageSimilar( $this->getReferencePath(), $dstPath, @@ -134,7 +135,6 @@ // ezcImageConversionTestCase::DEFAULT_SIMILARITY_GAP 12000 ); - $this->handler->close( $ref ); $this->removeTempDir(); } } -- svn-components mailing list svn-components@lists.ez.no http://lists.ez.no/mailman/listinfo/svn-components