Constraint class for image comparison.
Source for this file: /UnitTest/src/constraint/image.php
PHPUnit_Framework_Constraint | --ezcTestConstraintSimilarImage
Version: | //autogentag// |
protected int |
$delta
Maximum delta between images. |
protected int |
$difference
Difference between images. |
protected string |
$filename
Filename of the image to compare against. |
public ezcConstraintSimilarImage |
__construct(
$filename
, [ $delta
= 0] )
Constructor. |
public abstract bool |
evaluate(
$other
)
Evaluates the constraint for parameter $other. Returns TRUE if the constraint is met, FALSE otherwise. |
public void |
fail(
$other
, $description
, [ $not
= false] )
Creates the appropriate exception for the constraint which can be caught by the unit test system. This can be called if a call to evaluate() fails. |
public string |
toString(
)
Provide test text |
Constructor.
Name | Type | Description |
---|---|---|
$filename |
string | Filename of the image to compare against. |
$delta |
int | Maximum delta between images. |
Evaluates the constraint for parameter $other. Returns TRUE if the constraint is met, FALSE otherwise.
Name | Type | Description |
---|---|---|
$other |
mixed | Filename of the image to compare. |
Creates the appropriate exception for the constraint which can be caught by the unit test system. This can be called if a call to evaluate() fails.
Name | Type | Description |
---|---|---|
$other |
mixed | The value passed to evaluate() which failed the constraint check. |
$description |
string | A string with extra description of what was going on while the evaluation failed. |
$not |
boolean | Flag to indicate negation. |
Type | Description |
---|---|
PHPUnit_Framework_ExpectationFailedException |
Provide test text