protected function ContentEntityAutosaveFormTestBase::getCurrentPageTitle in Autosave Form 8
Returns the currently rendered page title.
Return value
string|NULL The page title.
1 call to ContentEntityAutosaveFormTestBase::getCurrentPageTitle()
- ContentEntityAutosaveFormTestBase::assertOriginalEntityTitleAsPageTitle in tests/
src/ FunctionalJavascript/ ContentEntity/ ContentEntityAutosaveFormTestBase.php - Asserts that page title matches the original entity title.
File
- tests/
src/ FunctionalJavascript/ ContentEntity/ ContentEntityAutosaveFormTestBase.php, line 541
Class
- ContentEntityAutosaveFormTestBase
- Base test class for testing autosave support for entity forms.
Namespace
Drupal\Tests\autosave_form\FunctionalJavascript\ContentEntityCode
protected function getCurrentPageTitle() {
$element = $this
->getSession()
->getPage()
->find('css', '.page-title');
$title = !empty($element) ? $element
->getText() : NULL;
return $title;
}