public function elementTextNotContains($selectorType, $selector, $text)
    {
        $element = $this->elementExists($selectorType, $selector);
        $actual = $element->getText();
        $regex = '/'.preg_quote($text, '/').'/ui';

        $message = sprintf(
            'The text "%s" appears in the text of the %s, but it should not.',
            $text,
            $this->getMatchingElementRepresentation($selectorType, $selector)
        );

        $this->assertElementText(!preg_match($regex, $actual), $message, $element);
    }
public function elementTextNotContains($selectorType, $selector, $text)
    {
        $element = $this->elementExists($selectorType, $selector);
        $actual = $element->getText();
        $regex = '/'.preg_quote($text, '/').'/ui';

        $message = sprintf(
            'The text "%s" appears in the text of the %s, but it should not.',
            $text,
            $this->getMatchingElementRepresentation($selectorType, $selector)
        );

        $this->assertElementText(!preg_match($regex, $actual), $message, $element);
    }
public function elementTextNotContains ( $ selectorType , $ selector , $ text ) { $ element = $ this -> elementExists ( $ selectorType , $ selector ) ; $ actual = $ element -> getText ( ) ; $ regex = '/' . preg_quote ( $ text , '/' ) . '/ui' ; $ message = sprintf ( 'The text "%s" appears in the text of the %s, but it should not.' , $ text , $ this -> getMatchingElementRepresentation ( $ selectorType , $ selector ) ) ; $ this -> assertElementText ( ! preg_match ( $ regex , $ actual ) , $ message , $ element ) ; }
Checks that specific element does not contains text.

@param string       $selectorType element selector type (css, xpath)
@param string|array $selector     element selector
@param string       $text         expected text

@throws ElementTextException
Checks that specific element does not contains text .