public function NodeViewTest::testViewNonPremiumNode in Node Option Premium 8
Tests that the full content is displayed for a non-premium node.
File
- tests/
src/ Functional/ NodeViewTest.php, line 77
Class
- NodeViewTest
- Tests displaying nodes.
Namespace
Drupal\Tests\nopremium\FunctionalCode
public function testViewNonPremiumNode() {
// Create a public node.
$node = $this
->createNodeWithBodyValue('Lorem ipsum');
$this
->drupalGet($node
->toUrl());
$this
->assertSession()
->pageTextContains('Lorem ipsum');
$this
->assertSession()
->pageTextNotContains('The full content of this page is available to premium users only.');
}