public function FeatureContext::assertContentInWysiwygEditor in Bear 7
@Then /^I should see "([^"]*)" in the "([^"]*)" WYSIWYG editor$/
File
- tests/
features/ bootstrap/ FeatureContext.php, line 342
Class
- FeatureContext
- Defines application features from the specific context.
Code
public function assertContentInWysiwygEditor($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 not found in the "%s" WYSWIYG editor on the page %s', $text, $instanceId, $this
->getSession()
->getCurrentUrl()));
}
}