TextExpectation::test PHP Method

test() public method

Tests the expectation. True if the text contains the substring.
public test ( string $compare ) : boolean
$compare string Comparison value.
return boolean True if correct.
    public function test($compare)
    {
        return strpos($compare, $this->substring) !== false;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  *    Tests the expectation. False if the substring appears
  *    in the text.
  *    @param string $compare        Comparison value.
  *    @return boolean               True if correct.
  *    @access public
  */
 function test($compare)
 {
     return !parent::test($compare);
 }
All Usage Examples Of TextExpectation::test