protected function TestBase::editorSetValue in Twig Field 8
Sets CodeMirror document value.
1 call to TestBase::editorSetValue()
- TwigFieldTest::testTwigField in tests/
src/ FunctionalJavascript/ TwigFieldTest.php - Test callback.
File
- tests/
src/ FunctionalJavascript/ TestBase.php, line 57
Class
- TestBase
- Base class for Twig field tests.
Namespace
Drupal\Tests\twig_field\FunctionalJavascriptCode
protected function editorSetValue($value) {
$script = 'document.querySelector("#edit-field-template-wrapper .CodeMirror").CodeMirror.setValue("%s");';
$script = sprintf($script, $value);
$this
->getSession()
->getDriver()
->executeScript($script);
}