public function hasSize($size, $failMessage = null)
{
if (($actual = iterator_count($this->valueIsSet()->value)) == $size) {
$this->pass();
} else {
$this->fail($failMessage ?: $this->getLocale()->_('%s has size %d, expected size %d', $this, $actual, $size));
}
return $this;
}