You are here

public function FeatureContext::assertContentNotInWysiwygEditor in Bear 7

@Then /^I should not see "([^"]*)" in the "([^"]*)" WYSIWYG editor$/

File

tests/features/bootstrap/FeatureContext.php, line 353

Class

FeatureContext
Defines application features from the specific context.

Code

public function assertContentNotInWysiwygEditor($text, $tag, $region) {
  $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()));
  }
}