mageekguy\atoum\asserters\phpResource::matches PHP Метод

matches() защищенный Метод

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