FreelinkingPrefixAffixTest.php in Freelinking 4.0.x
File
tests/src/Functional/FreelinkingPrefixAffixTest.php
View source
<?php
namespace Drupal\Tests\freelinking\Functional;
class FreelinkingPrefixAffixTest extends FreelinkingBrowserTestBase {
protected function setUp() : void {
parent::setUp();
$this
->updateFilterSettings();
}
public function testPrefixAffix() {
$edit = [];
$edit['title[0][value]'] = $this
->getRandomGenerator()
->sentences(2);
$edit['body[0][value]'] = $this
->getNodeBodyValue();
$this
->drupalGet('node/add/page');
$this
->submitForm($edit, '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";
}
}