protected function FreelinkingFilterTest::getNodeBodyValue in Freelinking 4.0.x
Same name and namespace in other branches
- 8.3 tests/src/Functional/FreelinkingFilterTest.php \Drupal\Tests\freelinking\Functional\FreelinkingFilterTest::getNodeBodyValue()
Get HTML to use for node body.
Return value
string The value to use for the node body.
1 call to FreelinkingFilterTest::getNodeBodyValue()
- FreelinkingFilterTest::testFreelinkingPlugins in tests/
src/ Functional/ FreelinkingFilterTest.php - Tests all plugins.
File
- tests/
src/ Functional/ FreelinkingFilterTest.php, line 120
Class
- FreelinkingFilterTest
- Tests that freelinking filter is functional.
Namespace
Drupal\Tests\freelinking\FunctionalCode
protected function getNodeBodyValue() {
$uid = $this->privilegedUser
->id();
$name = $this->privilegedUser
->getDisplayName();
return <<<EOF
<ul>
<li>Default plugin (nodetitle): [[First page]]</li>
<li>Nodetitle: [[nodetitle:Second page]]</li>
<li>Nid: [[nid:2]]</li>
<li>User: [[u:{<span class="php-variable">$uid</span>}]]</li>
<li>Username: [[user:{<span class="php-variable">$name</span>}]]</li>
<li>Drupalproject: [[drupalproject:freelinking]]</li>
<li>Drupalorg: [[drupalorg:1]]</li>
<li>Search: [[search:test]]</li>
<li>Google: [[google:drupal]]</li>
<li>File: [[file:logo.svg]]</li>
<li>Wikipedia: [[wikipedia:Main_Page]]</li>
<li>Wikiquote: [[wikiquote:Main Page]]</li>
<li>Wiktionary: [[wiktionary:Main Page]]</li>
<li>Wikinews: [[wikinews:Main Page]]</li>
<li>Wikisource: [[wikisource:Main Page]]</li>
<li>Wikibooks: [[wikibooks:Main Page]]</li>
<li>Showtext: [[showtext:Shown Text]]</li>
<li>Nowiki: [[nowiki:No Wiki]]</li>
<li>Path Alias: [[path:third-page]]</li>
</ul>
<p>Testing compatibility with other modules</p>
<ul>
<li>Respects [[drupalproject:media]] tags, such as:
[[{"type":"media","view_mode":"media_large","fid":"286","attributes":{"alt":"","class":"media-image","typeof":"foaf:Image"}}]]
</li>
</ul>
EOF;
}