mageekguy\atoum\asserters\phpString::endWith PHP Method

endWith() public method

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