public function startWith($fragment, $failMessage = null) { if (strpos($this->valueIsSet()->value, $fragment) === 0) { $this->pass(); } else { $this->fail($failMessage ?: $this->_('%s does not start with %s', $this, $fragment)); } return $this; }