## Apache Zeta Components Manual :: Docs For Class ezcTestImageCase

### UnitTest::ezcTestImageCase

### Class ezcTestImageCase

Abstract base class for image related test cases.

Source for this file: /UnitTest/src/test/image_case.php

    PHPUnit_Framework_TestCase
       |
       --ezcTestCase
          |
          --ezcTestImageCase

Version: | //autogentag//

### Method Summary

public void | `assertImageSame( $expectedImage , $image , [ $message = ''] )` Asserts that the compared images are same
public void | `assertImageSimilar( $expectedImage , $image , [ $message = ''] , [ $maxDifference = 0] )` Asserts that the compared images are similar

### Inherited Methods

From ezcTestCase
public void | `ezcTestCase::assertSetProperty()` Checks if $expectedValues are properly set on $propertyName in $object.
public void | `ezcTestCase::assertSetPropertyFails()` Checks if $setValues fail when set on $propertyName in $object.
public void | `ezcTestCase::cleanTempDir()`
protected void | `ezcTestCase::createTempDir()` Creates and returns the temporary directory.
public void | `ezcTestCase::getTempDir()` Get the name of the temporary directory.
public void | `ezcTestCase::removeTempDir()` Remove the temp directory.

### Methods

#### assertImageSame

void assertImageSame( string $expectedImage , string $image , [string $message = ''] )

Asserts that the compared images are same

Uses the compare binary of the imagemagick package to compare to images and will fail if the difference between two images is higher then zero.

##### Parameters:

Name | Type | Description
--- | --- | ---
`$image` | string | New image
`$expectedImage` | string | Image to compare with
`$message` | string | Message to append to the fail message

#### assertImageSimilar

void assertImageSimilar( string $expectedImage , string $image , [string $message = ''] , [int $maxDifference = 0] )

Asserts that the compared images are similar

Uses the compare binary of the imagemagick package to compare to images and will fail if the difference between two images is higher then the defined value.

See http://www.imagemagick.org/script/compare.php for details. The difference is logarithmical scaled.

##### Parameters:

Name | Type | Description
--- | --- | ---
`$image` | string | New image
`$expectedImage` | string | Image to compare with
`$message` | string | Message to append to the fail message
`$maxDifference` | int | Maximum difference between images

Documentation generated by phpDocumentor 1.4.3