/**
* Determines whether or not the given dataset matches the dataset used to
* create this constraint.
*
* @param PHPUnit_Extensions_Database_DataSet_IDataSet $other
* @return bool
*/
public function evaluate($other)
{
if ($other instanceof PHPUnit_Extensions_Database_DataSet_IDataSet) {
try {
$this->value->assertEquals($other);
return TRUE;
} catch (Exception $e) {
$this->failure_reason = $e->getMessage();
return FALSE;
}
} else {
throw new InvalidArgumentException("PHPUnit_Extensions_Database_DataSet_IDataSet expected");
}
}