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

matches() public method

public matches ( $pattern, $failMessage = null )
    public function matches($pattern, $failMessage = null)
    {
        if (preg_match($pattern, $this->valueIsSet()->value) === 1) {
            $this->pass();
        } else {
            $this->fail($failMessage ?: $this->_('%s does not match %s', $this, $pattern));
        }
        return $this;
    }