public function postContentEditorIsInMode(string $mode)
    {
        $content_editor = $this->edit_post_page->getContentEditor();
        if (strtoupper($mode) !== $content_editor->getMode()) {
            throw new ExpectationException(
                sprintf('[W808] Content editor is in "%1$s" mode. Expected "%2$s".', $content_editor->getMode(), $mode),
                $this->getSession()->getDriver()
            );
        }
    }
public function postContentEditorIsInMode(string $mode)
    {
        $content_editor = $this->edit_post_page->getContentEditor();
        if (strtoupper($mode) !== $content_editor->getMode()) {
            throw new ExpectationException(
                sprintf('[W808] Content editor is in "%1$s" mode. Expected "%2$s".', $content_editor->getMode(), $mode),
                $this->getSession()->getDriver()
            );
        }
    }
public function postContentEditorIsInMode ( string $ mode ) { $ content_editor = $ this -> edit_post_page -> getContentEditor ( ) ; if ( strtoupper ( $ mode ) !== $ content_editor -> getMode ( ) ) { throw new ExpectationException ( sprintf ( '[W808] Content editor is in "%1$s" mode. Expected "%2$s".' , $ content_editor -> getMode ( ) , $ mode ) , $ this -> getSession ( ) -> getDriver ( ) ) ; } }
Assert the mode that the content editor is in.

Example: Then The post content editor is in Visual mode
Example: Then The post content editor is in Text mode

@Then /^the post content editor is in (visual|text) mode$/i

@param string $mode Assert that the editor is the specified mode (visual or text).

@throws ExpectationException
Assert the mode that the content editor is in .