Skip to content
Snippets Groups Projects
Commit 403b56bb authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2329009 by znerol: Fixed SummaryLengthTest::testSummaryLength() must...

Issue #2329009 by znerol: Fixed SummaryLengthTest::testSummaryLength() must not alter WebTestBase::loggedInUser.
parent 68cd18ce
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -16,7 +16,7 @@ class SummaryLengthTest extends NodeTestBase {
/**
* Tests the node summary length functionality.
*/
function testSummaryLength() {
public function testSummaryLength() {
// Create a node to view.
$settings = array(
'body' => array(array('value' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam vitae arcu at leo cursus laoreet. Curabitur dui tortor, adipiscing malesuada tempor in, bibendum ac diam. Cras non tellus a libero pellentesque condimentum. What is a Drupalism? Suspendisse ac lacus libero. Ut non est vel nisl faucibus interdum nec sed leo. Pellentesque sem risus, vulputate eu semper eget, auctor in libero. Ut fermentum est vitae metus convallis scelerisque. Phasellus pellentesque rhoncus tellus, eu dignissim purus posuere id. Quisque eu fringilla ligula. Morbi ullamcorper, lorem et mattis egestas, tortor neque pretium velit, eget eleifend odio turpis eu purus. Donec vitae metus quis leo pretium tincidunt a pulvinar sem. Morbi adipiscing laoreet mauris vel placerat. Nullam elementum, nisl sit amet scelerisque malesuada, dolor nunc hendrerit quam, eu ultrices erat est in orci. Curabitur feugiat egestas nisl sed accumsan.')),
......@@ -25,10 +25,6 @@ function testSummaryLength() {
$node = $this->drupalCreateNode($settings);
$this->assertTrue(node_load($node->id()), 'Node created.');
// Create user with permission to view the node.
$web_user = $this->drupalCreateUser(array('access content', 'administer content types'));
$this->loggedInUser = $web_user;
// Render the node as a teaser.
$content = $this->drupalBuildEntityView($node, 'teaser');
$this->assertTrue(strlen($content['body'][0]['#markup']) < 600, 'Teaser is less than 600 characters long.');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment