public function iShouldSeeTextInToolbar(string $text)
    {
        $toolbar = $this->getElement('Toolbar');
        $actual  = $toolbar->getText();
        $regex   = '/' . preg_quote($text, '/') . '/ui';

        if (! preg_match($regex, $actual)) {
            $message = sprintf('[W806] The text "%s" was not found in the toolbar', $text);
            throw new ElementTextException($message, $this->getSession()->getDriver(), $toolbar);
        }
    }
public function iShouldSeeTextInToolbar(string $text)
    {
        $toolbar = $this->getElement('Toolbar');
        $actual  = $toolbar->getText();
        $regex   = '/' . preg_quote($text, '/') . '/ui';

        if (! preg_match($regex, $actual)) {
            $message = sprintf('[W806] The text "%s" was not found in the toolbar', $text);
            throw new ElementTextException($message, $this->getSession()->getDriver(), $toolbar);
        }
    }
public function iShouldSeeTextInToolbar ( string $ text ) { $ toolbar = $ this -> getElement ( 'Toolbar' ) ; $ actual = $ toolbar -> getText ( ) ; $ regex = '/' . preg_quote ( $ text , '/' ) . '/ui' ; if ( ! preg_match ( $ regex , $ actual ) ) { $ message = sprintf ( '[W806] The text "%s" was not found in the toolbar' , $ text ) ; throw new ElementTextException ( $ message , $ this -> getSession ( ) -> getDriver ( ) , $ toolbar ) ; } }
Clicks the specified link in the toolbar.

Example: Then I should see "Howdy, admin" in the toolbar

@Then I should see :text in the toolbar

@param string $text

@throws ElementTextException
Clicks the specified link in the toolbar .