public function FreelinkingPrefixAffixTest::testPrefixAffix in Freelinking 8.3
Same name and namespace in other branches
- 4.0.x tests/src/Functional/FreelinkingPrefixAffixTest.php \Drupal\Tests\freelinking\Functional\FreelinkingPrefixAffixTest::testPrefixAffix()
Asserts that text does not contain a break before or after the text.
Throws
\Behat\Mink\Exception\ResponseTextException
\Behat\Mink\Exception\ExpectationException
File
- tests/
src/ Functional/ FreelinkingPrefixAffixTest.php, line 28
Class
- FreelinkingPrefixAffixTest
- Tests that text is displayed inline after rendering.
Namespace
Drupal\Tests\freelinking\FunctionalCode
public function testPrefixAffix() {
// Create node that will contain a sample of each plugin.
$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]'],
]));
// Confirm that the text is inline.
$this
->assertSession()
->pageTextContains('PrefixFirst pageSuffix');
}