PatternExpectation::test PHP Method

test() public method

Tests the expectation. True if the Perl regex matches the comparison value.
public test ( string $compare ) : boolean
$compare string Comparison value.
return boolean True if correct.
    public function test($compare)
    {
        return (bool) preg_match($this->getPattern(), $compare);
    }

Usage Example

Exemplo n.º 1
0
 /**
  *    Tests the expectation. False if the Perl regex
  *    matches the comparison value.
  *    @param string $compare        Comparison value.
  *    @return boolean               True if correct.
  *    @access public
  */
 function test($compare)
 {
     return !parent::test($compare);
 }
All Usage Examples Of PatternExpectation::test