public function SmartReadMoreLinkTest::testCreateArticleWithShortBody in Smart read more link 8
File
- tests/
src/ Functional/ SmartReadMoreLinkTest.php, line 54
Class
- SmartReadMoreLinkTest
- Functional tests of smart_read_more_link module.
Namespace
Drupal\Tests\smart_read_more_link\FunctionalCode
public function testCreateArticleWithShortBody() {
$node = Node::create([
'type' => 'article',
'title' => 'Test 1',
'body' => [
'summary' => '',
'value' => '<p>The body of my node.</p>',
'format' => 'full_html',
],
]);
$node
->save();
$this
->drupalGet('/node/' . $node
->id());
$this
->assertSession()
->pageTextContains('The body of my node');
$this
->drupalGet('/node');
$this
->assertSession()
->pageTextNotContains('Read more');
}