function equal($value): self {
    if ($this->hasFlag('file')) {
      if ($this->hasFlag('negate')) assertFileNotEquals($value, $this->target, $this->message);
      else assertFileEquals($value, $this->target, $this->message);
      return $this;
    }

    $target = $this->hasFlag('length') ? $this->getLength($this->target) : $this->target;
    return $this->expect($target, equalTo($value));
  }