public function WysiwygSubContext::assertContentNotInWysiwygEditor in Panopoly 7
Same name and namespace in other branches
- 8.2 modules/panopoly/panopoly_test/behat/steps/panopoly_test_wysiwyg.behat.inc \WysiwygSubContext::assertContentNotInWysiwygEditor()
@Then I should not see :text in the :instanceId WYSIWYG editor
File
- modules/
panopoly/ panopoly_test/ behat/ steps/ panopoly_test_wysiwyg.behat.inc, line 183 - Provide Behat step-definitions for WYSIWYG editor.
Class
Code
public function assertContentNotInWysiwygEditor($text, $instanceId) {
$instance = $this
->getWysiwygInstance($instanceId);
$content = $this
->evaluateScript("return {$instance}.getContent()");
if (strpos($text, $content) !== FALSE) {
throw new \Exception(sprintf('The text "%s" was found in the "%s" WYSWIYG editor on the page %s', $text, $instanceId, $this
->getSession()
->getCurrentUrl()));
}
}