public function stringValidatorShouldReturnErrorIfObjectWithToStringMethodStringIsGiven()
{
$className = 'TestClass' . md5(uniqid(mt_rand(), true));
eval('
class ' . $className . ' {
public function __toString() {
return "ASDF";
}
}
');
$object = new $className();
$this->assertTrue($this->validator->validate($object)->hasErrors());
}