FreelinkingPrefixAffixTest.php in Freelinking 8.3
File
tests/src/Functional/FreelinkingPrefixAffixTest.php
View source
<?php
namespace Drupal\Tests\freelinking\Functional;
class FreelinkingPrefixAffixTest extends FreelinkingBrowserTestBase {
protected function setUp() {
parent::setUp();
$this
->updateFilterSettings();
}
public function testPrefixAffix() {
$edit = [];
$edit['title[0][value]'] = $this
->getRandomGenerator()
->sentences(2);
$edit['body[0][value]'] = $this
->getNodeBodyValue();
$this
->drupalPostForm('node/add/page', $edit, t('Save'));
$this
->assertSession()
->pageTextContains(t('Basic page @title has been created.', [
'@title' => $edit['title[0][value]'],
]));
$this
->assertSession()
->pageTextContains('PrefixFirst pageSuffix');
}
protected function getNodeBodyValue() {
return "Prefix[[First page]]Suffix";
}
}