private function assert($message, $selectorId, $exceptionMsgNone, $exceptionMsgMissing)
    {
        $selector = $this->getDrupalSelector($selectorId);
        $selectorObjects = $this->getSession()->getPage()->findAll("css", $selector);
        if (empty($selectorObjects)) {
            throw new ExpectationException(sprintf($exceptionMsgNone, $this->getSession()->getCurrentUrl()), $this->getSession()->getDriver());
        }
        foreach ($selectorObjects as $selectorObject) {
            if (strpos(trim($selectorObject->getText()), $message) !== false) {
                return;
            }
        }
        throw new ExpectationException(sprintf($exceptionMsgMissing, $this->getSession()->getCurrentUrl(), $message), $this->getSession()->getDriver());
    }
private function assert($message, $selectorId, $exceptionMsgNone, $exceptionMsgMissing)
    {
        $selector = $this->getDrupalSelector($selectorId);
        $selectorObjects = $this->getSession()->getPage()->findAll("css", $selector);
        if (empty($selectorObjects)) {
            throw new ExpectationException(sprintf($exceptionMsgNone, $this->getSession()->getCurrentUrl()), $this->getSession()->getDriver());
        }
        foreach ($selectorObjects as $selectorObject) {
            if (strpos(trim($selectorObject->getText()), $message) !== false) {
                return;
            }
        }
        throw new ExpectationException(sprintf($exceptionMsgMissing, $this->getSession()->getCurrentUrl(), $message), $this->getSession()->getDriver());
    }
private function assert ( $ message , $ selectorId , $ exceptionMsgNone , $ exceptionMsgMissing ) { $ selector = $ this -> getDrupalSelector ( $ selectorId ) ; $ selectorObjects = $ this -> getSession ( ) -> getPage ( ) -> findAll ( "css" , $ selector ) ; if ( empty ( $ selectorObjects ) ) { throw new ExpectationException ( sprintf ( $ exceptionMsgNone , $ this -> getSession ( ) -> getCurrentUrl ( ) ) , $ this -> getSession ( ) -> getDriver ( ) ) ; } foreach ( $ selectorObjects as $ selectorObject ) { if ( strpos ( trim ( $ selectorObject -> getText ( ) ) , $ message ) !== false ) { return ; } } throw new ExpectationException ( sprintf ( $ exceptionMsgMissing , $ this -> getSession ( ) -> getCurrentUrl ( ) , $ message ) , $ this -> getSession ( ) -> getDriver ( ) ) ; }
Internal callback to check for a specific message in a given context.

@param $message
string The message to be checked
@param $selectorId
string CSS selector name
@param $exceptionMsgNone
string The message being thrown when no message is contained, string
should contain one '%s' as a placeholder for the current URL
@param $exceptionMsgMissing
string The message being thrown when the message is not contained, string
should contain two '%s' as placeholders for the current URL and the message.

@throws \Behat\Mink\Exception\ExpectationException
Thrown when the expected message is not present in the page.
Internal callback to check for a specific message in a given context .