public function ThunderJavascriptTestBase::assertCkEditorContent in Thunder 6.0.x
Same name and namespace in other branches
- 8.5 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::assertCkEditorContent()
- 8.2 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::assertCkEditorContent()
- 8.3 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::assertCkEditorContent()
- 8.4 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::assertCkEditorContent()
- 6.2.x tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::assertCkEditorContent()
- 6.1.x tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::assertCkEditorContent()
Assert that CKEditor instance contains correct data.
Parameters
string $ckEditorCssSelector: CSS selector for CKEditor.
string $expectedContent: The expected content.
3 calls to ThunderJavascriptTestBase::assertCkEditorContent()
- ParagraphSplitTest::testAddParagraphAfterSplitDataLoss in tests/
src/ FunctionalJavascript/ Integration/ ParagraphSplitTest.php - Test if a adding paragraph after split leads to data loss.
- ParagraphSplitTest::testParagraphSplitBefore in tests/
src/ FunctionalJavascript/ Integration/ ParagraphSplitTest.php - Test split of paragraph before a selection.
- ParagraphSplitTest::testParagraphSplitDataLoss in tests/
src/ FunctionalJavascript/ Integration/ ParagraphSplitTest.php - Test if a deleted paragraph leads to data loss.
File
- tests/
src/ FunctionalJavascript/ ThunderJavascriptTestBase.php, line 323
Class
- ThunderJavascriptTestBase
- Base class for Thunder Javascript functional tests.
Namespace
Drupal\Tests\thunder\FunctionalJavascriptCode
public function assertCkEditorContent($ckEditorCssSelector, $expectedContent) {
$ckEditorId = $this
->getCkEditorId($ckEditorCssSelector);
$ckEditorContent = $this
->getSession()
->getDriver()
->evaluateScript("return CKEDITOR.instances[\"{$ckEditorId}\"].getData();");
static::assertEquals($expectedContent, $ckEditorContent);
}