Issue #2329009 by znerol: Fixed SummaryLengthTest::testSummaryLength() must not alter WebTestBase::loggedInUser.

8.0.x
webchick 2014-08-28 23:36:15 -07:00
parent 68cd18cec3
commit 403b56bb19
1 changed files with 1 additions and 5 deletions

View File

@ -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 @@ class SummaryLengthTest extends NodeTestBase {
$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.');