Commit 6dce6c2a authored by alexpott's avatar alexpott

Issue #2697909 by pguillard, himanshugautam, snehi, aburrows, jhodgdon: Fix...

Issue #2697909 by pguillard, himanshugautam, snehi, aburrows, jhodgdon: Fix "login (noun/adjective)" vs. "log in (verb)" in comments (and logout/log out)
parent 3d404ae1
...@@ -415,8 +415,8 @@ Drupal 7.0, 2011-01-05 ...@@ -415,8 +415,8 @@ Drupal 7.0, 2011-01-05
are available. are available.
- OpenID: - OpenID:
* Added support for Gmail and Google Apps for Domain identifiers. Users can * Added support for Gmail and Google Apps for Domain identifiers. Users can
now login with their user@example.com identifier when example.com is powered now log in with their user@example.com identifier when example.com is
by Google. powered by Google.
* Made the OpenID module more pluggable. * Made the OpenID module more pluggable.
- Added code registry: - Added code registry:
* Using the registry, modules declare their includable files via their .info file, * Using the registry, modules declare their includable files via their .info file,
......
...@@ -106,7 +106,7 @@ public function getPreferredAdminLangcode($fallback_to_default = TRUE); ...@@ -106,7 +106,7 @@ public function getPreferredAdminLangcode($fallback_to_default = TRUE);
* @return string * @return string
* An unsanitized plain-text string with the name of this account that is * An unsanitized plain-text string with the name of this account that is
* used to log in. Only display this name to admins and to the user who owns * used to log in. Only display this name to admins and to the user who owns
* this account, and only in the context of the name used to login. For * this account, and only in the context of the name used to log in. For
* any other display purposes, use * any other display purposes, use
* \Drupal\Core\Session\AccountInterface::getDisplayName() instead. * \Drupal\Core\Session\AccountInterface::getDisplayName() instead.
* *
......
...@@ -150,7 +150,8 @@ public function testMultipleLanguageTypes() { ...@@ -150,7 +150,8 @@ public function testMultipleLanguageTypes() {
$this->drupalGet('node', ['query' => ['language' => 'fr']]); $this->drupalGet('node', ['query' => ['language' => 'fr']]);
$this->assertText('Powered by Drupal', 'The body of the block appears on the page.'); $this->assertText('Powered by Drupal', 'The body of the block appears on the page.');
// Re-login in order to clear the interface language stored in the session. // Log in again in order to clear the interface language stored in the
// session.
$this->drupalLogout(); $this->drupalLogout();
$this->drupalLogin($this->adminUser); $this->drupalLogin($this->adminUser);
......
...@@ -42,7 +42,7 @@ public function testUpdateHookN() { ...@@ -42,7 +42,7 @@ public function testUpdateHookN() {
// Disable maintenance mode. // Disable maintenance mode.
\Drupal::state()->set('system.maintenance_mode', FALSE); \Drupal::state()->set('system.maintenance_mode', FALSE);
// We finished updating so we can login the user now. // We finished updating so we can log in the user now.
$this->drupalLogin($this->rootUser); $this->drupalLogin($this->rootUser);
// The block that we are testing has the following visibility rules: // The block that we are testing has the following visibility rules:
......
...@@ -46,7 +46,7 @@ protected function setUp() { ...@@ -46,7 +46,7 @@ protected function setUp() {
* Tests creating a block type programmatically and via a form. * Tests creating a block type programmatically and via a form.
*/ */
public function testBlockContentTypeCreation() { public function testBlockContentTypeCreation() {
// Login a test user. // Log in a test user.
$this->drupalLogin($this->adminUser); $this->drupalLogin($this->adminUser);
// Test the page with no block-types. // Test the page with no block-types.
......
...@@ -377,7 +377,7 @@ function testBookExport() { ...@@ -377,7 +377,7 @@ function testBookExport() {
// Create a book. // Create a book.
$nodes = $this->createBook(); $nodes = $this->createBook();
// Login as web user and view printer-friendly version. // Log in as web user and view printer-friendly version.
$this->drupalLogin($this->webUser); $this->drupalLogin($this->webUser);
$this->drupalGet('node/' . $this->book->id()); $this->drupalGet('node/' . $this->book->id());
$this->clickLink(t('Printer-friendly version')); $this->clickLink(t('Printer-friendly version'));
...@@ -735,7 +735,7 @@ public function testHookNodeLoadAccess() { ...@@ -735,7 +735,7 @@ public function testHookNodeLoadAccess() {
$node_storage = \Drupal::entityManager()->getStorage('node'); $node_storage = \Drupal::entityManager()->getStorage('node');
$node_storage->resetCache(); $node_storage->resetCache();
// Login as user without access to the book node, so no 'node test view' // Log in as user without access to the book node, so no 'node test view'
// permission. // permission.
// @see node_access_test_node_grants(). // @see node_access_test_node_grants().
$this->drupalLogin($this->webUserWithoutNodeAccess); $this->drupalLogin($this->webUserWithoutNodeAccess);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
/** /**
* Defines a class for building markup for comment links on a commented entity. * Defines a class for building markup for comment links on a commented entity.
* *
* Comment links include 'login to post new comment', 'add new comment' etc. * Comment links include 'log in to post new comment', 'add new comment' etc.
*/ */
class CommentLinkBuilder implements CommentLinkBuilderInterface { class CommentLinkBuilder implements CommentLinkBuilderInterface {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
/** /**
* Defines an interface for building comment links on a commented entity. * Defines an interface for building comment links on a commented entity.
* *
* Comment links include 'login to post new comment', 'add new comment' etc. * Comment links include 'log in to post new comment', 'add new comment' etc.
*/ */
interface CommentLinkBuilderInterface { interface CommentLinkBuilderInterface {
......
...@@ -184,7 +184,7 @@ public function testEditComment() { ...@@ -184,7 +184,7 @@ public function testEditComment() {
'skip comment approval', 'skip comment approval',
)); ));
// Login as a web user. // Log in as a web user.
$this->drupalLogin($this->webUser); $this->drupalLogin($this->webUser);
// Post a comment. // Post a comment.
$comment = $this->postComment($this->node, $this->randomMachineName()); $comment = $this->postComment($this->node, $this->randomMachineName());
...@@ -201,7 +201,7 @@ public function testEditComment() { ...@@ -201,7 +201,7 @@ public function testEditComment() {
$author_mail = $this->randomMachineName() . '@example.com'; $author_mail = $this->randomMachineName() . '@example.com';
$anonymous_comment = $this->postComment($this->node, $this->randomMachineName(), $this->randomMachineName(), array('name' => $author_name, 'mail' => $author_mail)); $anonymous_comment = $this->postComment($this->node, $this->randomMachineName(), $this->randomMachineName(), array('name' => $author_name, 'mail' => $author_mail));
// Login as an admin user. // Log in as an admin user.
$this->drupalLogin($this->adminUser); $this->drupalLogin($this->adminUser);
// Make sure the comment field is not visible when // Make sure the comment field is not visible when
......
...@@ -173,7 +173,7 @@ function testAnonymous() { ...@@ -173,7 +173,7 @@ function testAnonymous() {
)); ));
$this->drupalGet('node/' . $this->node->id()); $this->drupalGet('node/' . $this->node->id());
$this->assertPattern('@<h2[^>]*>Comments</h2>@', 'Comments were displayed.'); $this->assertPattern('@<h2[^>]*>Comments</h2>@', 'Comments were displayed.');
$this->assertLink('Log in', 1, 'Link to log in was found.'); $this->assertLink('Log in', 1, 'Link to login was found.');
$this->assertLink('register', 1, 'Link to register was found.'); $this->assertLink('register', 1, 'Link to register was found.');
user_role_change_permissions(RoleInterface::ANONYMOUS_ID, array( user_role_change_permissions(RoleInterface::ANONYMOUS_ID, array(
......
...@@ -32,7 +32,7 @@ protected function setUp() { ...@@ -32,7 +32,7 @@ protected function setUp() {
$this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article')); $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
// Create and login user. // Create and log in user.
$admin_user = $this->drupalCreateUser(array('administer site configuration', 'administer languages', 'access administration pages', 'administer content types', 'administer comments', 'create article content', 'access comments', 'post comments', 'skip comment approval')); $admin_user = $this->drupalCreateUser(array('administer site configuration', 'administer languages', 'access administration pages', 'administer content types', 'administer comments', 'create article content', 'access comments', 'post comments', 'skip comment approval'));
$this->drupalLogin($admin_user); $this->drupalLogin($admin_user);
......
...@@ -356,7 +356,7 @@ function testCommentFunctionality() { ...@@ -356,7 +356,7 @@ function testCommentFunctionality() {
)); ));
$this->drupalGet('entity_test/' . $this->entity->id()); $this->drupalGet('entity_test/' . $this->entity->id());
$this->assertPattern('@<h2[^>]*>Comments</h2>@', 'Comments were displayed.'); $this->assertPattern('@<h2[^>]*>Comments</h2>@', 'Comments were displayed.');
$this->assertLink('Log in', 0, 'Link to log in was found.'); $this->assertLink('Log in', 0, 'Link to login was found.');
$this->assertLink('register', 0, 'Link to register was found.'); $this->assertLink('register', 0, 'Link to register was found.');
$this->assertNoFieldByName('subject[0][value]', '', 'Subject field not found.'); $this->assertNoFieldByName('subject[0][value]', '', 'Subject field not found.');
$this->assertNoFieldByName('comment_body[0][value]', '', 'Comment field not found.'); $this->assertNoFieldByName('comment_body[0][value]', '', 'Comment field not found.');
......
...@@ -35,7 +35,7 @@ function testCommentPreview() { ...@@ -35,7 +35,7 @@ function testCommentPreview() {
$this->setCommentSettings('default_mode', CommentManagerInterface::COMMENT_MODE_THREADED, 'Comment paging changed.'); $this->setCommentSettings('default_mode', CommentManagerInterface::COMMENT_MODE_THREADED, 'Comment paging changed.');
$this->drupalLogout(); $this->drupalLogout();
// Login as web user. // Log in as web user.
$this->drupalLogin($this->webUser); $this->drupalLogin($this->webUser);
// Test escaping of the username on the preview form. // Test escaping of the username on the preview form.
...@@ -86,7 +86,7 @@ public function testCommentPreviewDuplicateSubmission() { ...@@ -86,7 +86,7 @@ public function testCommentPreviewDuplicateSubmission() {
$this->setCommentSettings('default_mode', CommentManagerInterface::COMMENT_MODE_THREADED, 'Comment paging changed.'); $this->setCommentSettings('default_mode', CommentManagerInterface::COMMENT_MODE_THREADED, 'Comment paging changed.');
$this->drupalLogout(); $this->drupalLogout();
// Login as web user. // Log in as web user.
$this->drupalLogin($this->webUser); $this->drupalLogin($this->webUser);
// As the web user, fill in the comment form and preview the comment. // As the web user, fill in the comment form and preview the comment.
......
...@@ -54,7 +54,7 @@ public function testCommentTypeCreation() { ...@@ -54,7 +54,7 @@ public function testCommentTypeCreation() {
$comment_type = CommentType::load('other'); $comment_type = CommentType::load('other');
$this->assertTrue($comment_type, 'The new comment type has been created.'); $this->assertTrue($comment_type, 'The new comment type has been created.');
// Login a test user. // Log in a test user.
$this->drupalLogin($this->adminUser); $this->drupalLogin($this->adminUser);
$this->drupalGet('admin/structure/comment/manage/' . $type->id()); $this->drupalGet('admin/structure/comment/manage/' . $type->id());
......
...@@ -147,7 +147,7 @@ protected function doMenuListTest() { ...@@ -147,7 +147,7 @@ protected function doMenuListTest() {
// Test if the link to translate the menu is NOT on the page. // Test if the link to translate the menu is NOT on the page.
$this->assertNoLinkByHref($translate_link); $this->assertNoLinkByHref($translate_link);
// Login as Admin again otherwise the rest will fail. // Log in as Admin again otherwise the rest will fail.
$this->drupalLogin($this->adminUser); $this->drupalLogin($this->adminUser);
// Test if the link to translate actually goes to the translate page. // Test if the link to translate actually goes to the translate page.
......
...@@ -55,7 +55,7 @@ protected function setUp() { ...@@ -55,7 +55,7 @@ protected function setUp() {
'access contextual links', 'access contextual links',
'administer views', 'administer views',
); );
// Create and login user. // Create and log in user.
$this->drupalLogin($this->drupalCreateUser($permissions)); $this->drupalLogin($this->drupalCreateUser($permissions));
// Add languages. // Add languages.
......
...@@ -104,7 +104,7 @@ protected function setUp() { ...@@ -104,7 +104,7 @@ protected function setUp() {
'translate interface', 'translate interface',
] ]
); );
// Create and login user. // Create and log in user.
$this->translatorUser = $this->drupalCreateUser($translator_permissions); $this->translatorUser = $this->drupalCreateUser($translator_permissions);
$this->adminUser = $this->drupalCreateUser($admin_permissions); $this->adminUser = $this->drupalCreateUser($admin_permissions);
......
...@@ -42,7 +42,7 @@ protected function setUp() { ...@@ -42,7 +42,7 @@ protected function setUp() {
'administer site configuration', 'administer site configuration',
'translate configuration', 'translate configuration',
]; ];
// Create and login user. // Create and log in user.
$this->adminUser = $this->drupalCreateUser($admin_permissions); $this->adminUser = $this->drupalCreateUser($admin_permissions);
// Add languages. // Add languages.
......
...@@ -32,7 +32,7 @@ class ContactLanguageTest extends WebTestBase { ...@@ -32,7 +32,7 @@ class ContactLanguageTest extends WebTestBase {
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
// Create and login administrative user. // Create and log in administrative user.
$admin_user = $this->drupalCreateUser(array( $admin_user = $this->drupalCreateUser(array(
'access site-wide contact form', 'access site-wide contact form',
'administer languages', 'administer languages',
......
...@@ -42,7 +42,7 @@ protected function setUp() { ...@@ -42,7 +42,7 @@ protected function setUp() {
* Tests configuration options and the site-wide contact form. * Tests configuration options and the site-wide contact form.
*/ */
function testSiteWideContact() { function testSiteWideContact() {
// Create and login administrative user. // Create and log in administrative user.
$admin_user = $this->drupalCreateUser(array( $admin_user = $this->drupalCreateUser(array(
'access site-wide contact form', 'access site-wide contact form',
'administer contact forms', 'administer contact forms',
...@@ -296,7 +296,7 @@ function testSiteWideContact() { ...@@ -296,7 +296,7 @@ function testSiteWideContact() {
* Tests auto-reply on the site-wide contact form. * Tests auto-reply on the site-wide contact form.
*/ */
function testAutoReply() { function testAutoReply() {
// Create and login administrative user. // Create and log in administrative user.
$admin_user = $this->drupalCreateUser(array('access site-wide contact form', 'administer contact forms', 'administer permissions', 'administer users')); $admin_user = $this->drupalCreateUser(array('access site-wide contact form', 'administer contact forms', 'administer permissions', 'administer users'));
$this->drupalLogin($admin_user); $this->drupalLogin($admin_user);
......
...@@ -36,7 +36,7 @@ class ContactStorageTest extends ContactSitewideTest { ...@@ -36,7 +36,7 @@ class ContactStorageTest extends ContactSitewideTest {
* Tests configuration options and the site-wide contact form. * Tests configuration options and the site-wide contact form.
*/ */
public function testContactStorage() { public function testContactStorage() {
// Create and login administrative user. // Create and log in administrative user.
$admin_user = $this->drupalCreateUser(array( $admin_user = $this->drupalCreateUser(array(
'access site-wide contact form', 'access site-wide contact form',
'administer contact forms', 'administer contact forms',
......
...@@ -59,7 +59,7 @@ protected function setUp() { ...@@ -59,7 +59,7 @@ protected function setUp() {
* interfaces. * interfaces.
*/ */
function testDbLog() { function testDbLog() {
// Login the admin user. // Log in the admin user.
$this->drupalLogin($this->adminUser); $this->drupalLogin($this->adminUser);
$row_limit = 100; $row_limit = 100;
...@@ -78,7 +78,7 @@ function testDbLog() { ...@@ -78,7 +78,7 @@ function testDbLog() {
} }
} }
// Login the regular user. // Log in the regular user.
$this->drupalLogin($this->webUser); $this->drupalLogin($this->webUser);
$this->verifyReports(403); $this->verifyReports(403);
} }
...@@ -302,9 +302,9 @@ private function doUser() { ...@@ -302,9 +302,9 @@ private function doUser() {
$this->assertTrue($user != NULL, format_string('User @name was loaded', array('@name' => $name))); $this->assertTrue($user != NULL, format_string('User @name was loaded', array('@name' => $name)));
// pass_raw property is needed by drupalLogin. // pass_raw property is needed by drupalLogin.
$user->pass_raw = $pass; $user->pass_raw = $pass;
// Login user. // Log in user.
$this->drupalLogin($user); $this->drupalLogin($user);
// Logout user. // Log out user.
$this->drupalLogout(); $this->drupalLogout();
// Fetch the row IDs in watchdog that relate to the user. // Fetch the row IDs in watchdog that relate to the user.
$result = db_query('SELECT wid FROM {watchdog} WHERE uid = :uid', array(':uid' => $user->id())); $result = db_query('SELECT wid FROM {watchdog} WHERE uid = :uid', array(':uid' => $user->id()));
...@@ -314,7 +314,7 @@ private function doUser() { ...@@ -314,7 +314,7 @@ private function doUser() {
$count_before = (isset($ids)) ? count($ids) : 0; $count_before = (isset($ids)) ? count($ids) : 0;
$this->assertTrue($count_before > 0, format_string('DBLog contains @count records for @name', array('@count' => $count_before, '@name' => $user->getUsername()))); $this->assertTrue($count_before > 0, format_string('DBLog contains @count records for @name', array('@count' => $count_before, '@name' => $user->getUsername())));
// Login the admin user. // Log in the admin user.
$this->drupalLogin($this->adminUser); $this->drupalLogin($this->adminUser);
// Delete the user created at the start of this test. // Delete the user created at the start of this test.
// We need to POST here to invoke batch_process() in the internal browser. // We need to POST here to invoke batch_process() in the internal browser.
...@@ -329,9 +329,9 @@ private function doUser() { ...@@ -329,9 +329,9 @@ private function doUser() {
// Default display includes name and email address; if too long, the email // Default display includes name and email address; if too long, the email
// address is replaced by three periods. // address is replaced by three periods.
$this->assertLogMessage(t('New user: %name %email.', array('%name' => $name, '%email' => '<' . $user->getEmail() . '>')), 'DBLog event was recorded: [add user]'); $this->assertLogMessage(t('New user: %name %email.', array('%name' => $name, '%email' => '<' . $user->getEmail() . '>')), 'DBLog event was recorded: [add user]');
// Login user. // Log in user.
$this->assertLogMessage(t('Session opened for %name.', array('%name' => $name)), 'DBLog event was recorded: [login user]'); $this->assertLogMessage(t('Session opened for %name.', array('%name' => $name)), 'DBLog event was recorded: [login user]');
// Logout user. // Log out user.
$this->assertLogMessage(t('Session closed for %name.', array('%name' => $name)), 'DBLog event was recorded: [logout user]'); $this->assertLogMessage(t('Session closed for %name.', array('%name' => $name)), 'DBLog event was recorded: [logout user]');
// Delete user. // Delete user.
$message = t('Deleted user: %name %email.', array('%name' => $name, '%email' => '<' . $user->getEmail() . '>')); $message = t('Deleted user: %name %email.', array('%name' => $name, '%email' => '<' . $user->getEmail() . '>'));
...@@ -374,7 +374,7 @@ private function doNode($type) { ...@@ -374,7 +374,7 @@ private function doNode($type) {
// Create user. // Create user.
$perm = array('create ' . $type . ' content', 'edit own ' . $type . ' content', 'delete own ' . $type . ' content'); $perm = array('create ' . $type . ' content', 'edit own ' . $type . ' content', 'delete own ' . $type . ' content');
$user = $this->drupalCreateUser($perm); $user = $this->drupalCreateUser($perm);
// Login user. // Log in user.
$this->drupalLogin($user); $this->drupalLogin($user);
// Create a node using the form in order to generate an add content event // Create a node using the form in order to generate an add content event
...@@ -400,7 +400,7 @@ private function doNode($type) { ...@@ -400,7 +400,7 @@ private function doNode($type) {
$this->drupalGet('admin/reports/dblog'); $this->drupalGet('admin/reports/dblog');
$this->assertResponse(403); $this->assertResponse(403);
// Login the admin user. // Log in the admin user.
$this->drupalLogin($this->adminUser); $this->drupalLogin($this->adminUser);
// View the database log report. // View the database log report.
$this->drupalGet('admin/reports/dblog'); $this->drupalGet('admin/reports/dblog');
...@@ -499,7 +499,7 @@ public function testDBLogAddAndClear() { ...@@ -499,7 +499,7 @@ public function testDBLogAddAndClear() {
$this->container->get('logger.dblog')->log($log['severity'], $log['message'], $log); $this->container->get('logger.dblog')->log($log['severity'], $log['message'], $log);
// Make sure the table count has actually been incremented. // Make sure the table count has actually been incremented.
$this->assertEqual($count + 1, db_query('SELECT COUNT(*) FROM {watchdog}')->fetchField(), format_string('\Drupal\dblog\Logger\DbLog->log() added an entry to the dblog :count', array(':count' => $count))); $this->assertEqual($count + 1, db_query('SELECT COUNT(*) FROM {watchdog}')->fetchField(), format_string('\Drupal\dblog\Logger\DbLog->log() added an entry to the dblog :count', array(':count' => $count)));
// Login the admin user. // Log in the admin user.
$this->drupalLogin($this->adminUser); $this->drupalLogin($this->adminUser);
// Post in order to clear the database table. // Post in order to clear the database table.
$this->drupalPostForm('admin/reports/dblog', array(), t('Clear log messages')); $this->drupalPostForm('admin/reports/dblog', array(), t('Clear log messages'));
......
...@@ -130,7 +130,7 @@ public function testDisableFormatWithEditor() { ...@@ -130,7 +130,7 @@ public function testDisableFormatWithEditor() {
$node->body->format = 'monocerus'; $node->body->format = 'monocerus';
$node->save(); $node->save();
// Login as an user able to use both formats and edit nodes of created type. // Log in as an user able to use both formats and edit nodes of created type.
$account = $this->drupalCreateUser($permissions); $account = $this->drupalCreateUser($permissions);
$this->drupalLogin($account); $this->drupalLogin($account);
......
...@@ -37,7 +37,7 @@ protected function setUp() { ...@@ -37,7 +37,7 @@ protected function setUp() {
* Test the Field module's help page. * Test the Field module's help page.
*/ */
public function testFieldHelp() { public function testFieldHelp() {
// Login the admin user. // Log in the admin user.
$this->drupalLogin($this->adminUser); $this->drupalLogin($this->adminUser);
// Visit the Help page and make sure no warnings or notices are thrown. // Visit the Help page and make sure no warnings or notices are thrown.
......
...@@ -65,7 +65,7 @@ function testFileListingPages() { ...@@ -65,7 +65,7 @@ function testFileListingPages() {
$this->drupalGet('admin/content/files'); $this->drupalGet('admin/content/files');
$this->assertResponse(403); $this->assertResponse(403);
// Login with user with right permissions and test listing. // Log in with user with right permissions and test listing.
$this->drupalLogin($this->adminUser); $this->drupalLogin($this->adminUser);
for ($i = 0; $i < 5; $i++) { for ($i = 0; $i < 5; $i++) {
......
...@@ -36,7 +36,7 @@ protected function setUp() { ...@@ -36,7 +36,7 @@ protected function setUp() {
$this->fieldName = strtolower($this->randomMachineName()); $this->fieldName = strtolower($this->randomMachineName());
$this->createFileField($this->fieldName, 'node', 'page'); $this->createFileField($this->fieldName, 'node', 'page');
// Create and login user. // Create and log in user.
$permissions = array( $permissions = array(
'access administration pages', 'access administration pages',
'administer content translation', 'administer content translation',
......
...@@ -37,7 +37,7 @@ protected function setUp() { ...@@ -37,7 +37,7 @@ protected function setUp() {
$this->fieldName = strtolower($this->randomMachineName()); $this->fieldName = strtolower($this->randomMachineName());
$this->createFileField($this->fieldName, 'node', 'page', array('uri_scheme' => 'private')); $this->createFileField($this->fieldName, 'node', 'page', array('uri_scheme' => 'private'));
// Create and login user. // Create and log in user.
$permissions = array( $permissions = array(
'access administration pages', 'access administration pages',
'administer content translation', 'administer content translation',
......
...@@ -153,7 +153,7 @@ function testForum() { ...@@ -153,7 +153,7 @@ function testForum() {
$this->generateForumTopics(); $this->generateForumTopics();
// Login an unprivileged user to view the forum topics and generate an // Log in an unprivileged user to view the forum topics and generate an
// active forum topics list. // active forum topics list.
$this->drupalLogin($this->webUser); $this->drupalLogin($this->webUser);
// Verify that this user is shown a message that they may not post content. // Verify that this user is shown a message that they may not post content.
...@@ -180,7 +180,7 @@ function testForum() { ...@@ -180,7 +180,7 @@ function testForum() {
$this->drupalGet('forum/' . $this->forum['tid']); $this->drupalGet('forum/' . $this->forum['tid']);
$this->assertLink(t('Add new Forum topic')); $this->assertLink(t('Add new Forum topic'));
// Login a user with permission to edit any forum content. // Log in a user with permission to edit any forum content.
$this->drupalLogin($this->editAnyTopicsUser); $this->drupalLogin($this->editAnyTopicsUser);
// Verify that this user can edit forum content authored by another user. // Verify that this user can edit forum content authored by another user.
$this->verifyForums($own_topics_user_node, TRUE); $this->verifyForums($own_topics_user_node, TRUE);
...@@ -281,7 +281,7 @@ function testAddOrphanTopic() { ...@@ -281,7 +281,7 @@ function testAddOrphanTopic() {
* The logged-in user. * The logged-in user.
*/ */
private function doAdminTests($user) { private function doAdminTests($user) {
// Login the user. // Log in the user.
$this->drupalLogin($user); $this->drupalLogin($user);
// Add forum to the Tools menu. // Add forum to the Tools menu.
...@@ -467,7 +467,7 @@ function deleteForum($tid) { ...@@ -467,7 +467,7 @@ function deleteForum($tid) {
* User has 'access administration pages' privilege. * User has 'access administration pages' privilege.
*/ */
private function doBasicTests($user, $admin) { private function doBasicTests($user, $admin) {
// Login the user. // Log in the user.
$this->drupalLogin($user); $this->drupalLogin($user);
// Attempt to create forum topic under a container. // Attempt to create forum topic under a container.
$this->createForumTopic($this->forumContainer, TRUE); $this->createForumTopic($this->forumContainer, TRUE);
...@@ -481,7 +481,7 @@ private function doBasicTests($user, $admin) { ...@@ -481,7 +481,7 @@ private function doBasicTests($user, $admin) {
* Tests a forum with a new post displays properly. * Tests a forum with a new post displays properly.
*/ */
function testForumWithNewPost() { function testForumWithNewPost() {
// Login as the first user. // Log in as the first user.
$this->drupalLogin($this->adminUser); $this->drupalLogin($this->adminUser);
// Create a forum container. // Create a forum container.
$this->forumContainer = $this->createForum('container'); $this->forumContainer = $this->createForum('container');
...@@ -490,7 +490,7 @@ function testForumWithNewPost() { ...@@ -490,7 +490,7 @@ function testForumWithNewPost() {
// Create a topic. // Create a topic.
$node = $this->createForumTopic($this->forum, FALSE); $node = $this->createForumTopic($this->forum, FALSE);
// Login as a second user. // Log in as a second user.
$this->drupalLogin($this->postCommentUser); $this->drupalLogin($this->postCommentUser);
// Post a reply to the topic. // Post a reply to the topic.
$edit = array(); $edit = array();
...@@ -504,7 +504,7 @@ function testForumWithNewPost() { ...@@ -504,7 +504,7 @@ function testForumWithNewPost() {
$this->assertResponse(200); $this->assertResponse(200);
$this->assertFieldByName('comment_body[0][value]'); $this->assertFieldByName('comment_body[0][value]');
// Login as the first user. // Log in as the first user.
$this->drupalLogin($this->adminUser); $this->drupalLogin($this->adminUser);
// Check that forum renders properly. // Check that forum renders properly.
$this->drupalGet("forum/{$this->forum['tid']}"); $this->drupalGet("forum/{$this->forum['tid']}");
......
...@@ -51,12 +51,12 @@ protected function setUp() { ...@@ -51,12 +51,12 @@ protected function setUp() {
* Logs in users, tests help pages. * Logs in users, tests help pages.
*/ */
public function testHelp() { public function testHelp() {
// Login the root user to ensure as many admin links appear as possible on // Log in the root user to ensure as many admin links appear as possible on
// the module overview pages. // the module overview pages.
$this->drupalLogin($this->rootUser); $this->drupalLogin($this->rootUser);
$this->verifyHelp(); $this->verifyHelp();
// Login the regular user. // Log in the regular user.
$this->drupalLogin($this->anyUser); $this->drupalLogin($this->anyUser);
$this->verifyHelp(403); $this->verifyHelp(403);
......
...@@ -36,7 +36,7 @@ protected function setUp() { ...@@ -36,7 +36,7 @@ protected function setUp() {
$this->fieldName = strtolower($this->randomMachineName()); $this->fieldName = strtolower($this->randomMachineName());
$this->createImageField($this->fieldName, 'basicpage', [], ['title_field' => 1]); $this->createImageField($this->fieldName, 'basicpage', [], ['title_field' => 1]);
// Create and login user.