public function NodeTeaserAndPage::testNodeTeaserAndPage in Title 8.2
Test the title replacements work as expected.
File
- src/
Tests/ NodeTeaserAndPage.php, line 39
Class
- NodeTeaserAndPage
- Test the title field is configurable.
Namespace
Drupal\title\TestsCode
public function testNodeTeaserAndPage() {
$this
->drupalPostForm('admin/structure/types/manage/page', [
'display_configurable_title' => '1',
], 'Save content type');
$edit = [];
$edit['title[0][value]'] = 'Test Content';
$edit['body[0][value]'] = $this
->randomMachineName(16);
$this
->drupalPostForm('node/add/page', $edit, t('Save and publish'));
$this
->assertRaw('<h1 class="title replaced-title" id="page-title">Test Content</h1>');
$this
->drupalGet('node');
$this
->assertRaw('<h2><a href="/node/1">Test Content</a></h2>');
}