? rename_drupalLoginUser.patch Index: drupal_test_case.php =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/drupal_test_case.php,v retrieving revision 1.60 diff -u -p -r1.60 drupal_test_case.php --- drupal_test_case.php 22 Mar 2008 01:19:17 -0000 1.60 +++ drupal_test_case.php 22 Mar 2008 01:28:27 -0000 @@ -318,9 +318,9 @@ class DrupalTestCase extends UnitTestCas * @param object user object with pass_raw property! * @param $submit value of submit button on log in form */ - function drupalLoginUser($user = NULL, $submit = 'Log in') { + function drupalLogin($user = NULL, $submit = 'Log in') { if ($this->_logged_in) { - $this->drupalGet('logout'); + $this->drupalLogout(); } if (!isset($user)) { @@ -338,6 +338,18 @@ class DrupalTestCase extends UnitTestCas return $user; } + + /* + * Logs a user out of the internal browser, then check the login page to confirm logout. + */ + function drupalLogout() { + //make a request to the logout page + $this->drupalGet('logout'); + //load the user page, the idea being if you were properly logged out you should be seeing a login screen + $this->drupalGet('user'); + $this->assertField("name"); + $this->assertField("pass"); + } /** * tearDown implementation, setting back switched modules etc Index: tests/functional/aggregator.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/aggregator.test,v retrieving revision 1.2 diff -u -p -r1.2 aggregator.test --- tests/functional/aggregator.test 22 Mar 2008 01:19:17 -0000 1.2 +++ tests/functional/aggregator.test 22 Mar 2008 01:28:27 -0000 @@ -8,7 +8,7 @@ class DrupalAggregatorTestCase extends D parent::setUp(); $this->drupalModuleEnable('aggregator'); $web_user = $this->drupalCreateUserRolePerm(array('administer news feeds', 'access news feeds')); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); } /** Index: tests/functional/block.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/block.test,v retrieving revision 1.4 diff -u -p -r1.4 block.test --- tests/functional/block.test 22 Mar 2008 01:19:17 -0000 1.4 +++ tests/functional/block.test 22 Mar 2008 01:28:27 -0000 @@ -18,7 +18,7 @@ class BlockModuleTestCase extends Drupal // Create and login user $admin_user = $this->drupalCreateUserRolePerm(array('administer blocks')); - $this->drupalLoginUser($admin_user); + $this->drupalLogin($admin_user); } /** Index: tests/functional/blogapi.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/blogapi.test,v retrieving revision 1.3 diff -u -p -r1.3 blogapi.test --- tests/functional/blogapi.test 22 Mar 2008 01:19:17 -0000 1.3 +++ tests/functional/blogapi.test 22 Mar 2008 01:28:27 -0000 @@ -21,7 +21,7 @@ class BlogAPIModuleTestCase extends Drup function test_blog_API() { // Create admin user and taxononmy for later use. $admin_user = $this->drupalCreateUserRolePerm(array('administer taxonomy')); - $this->drupalLoginUser($admin_user); + $this->drupalLogin($admin_user); $vid = $this->add_vocabulary('simpletest_vocab'); @@ -31,7 +31,7 @@ class BlogAPIModuleTestCase extends Drup // Create user. $web_user = $this->drupalCreateUserRolePerm(array('create blog entries', 'delete own blog entries', 'edit own blog entries', 'administer content with blog api')); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); // Init common variables. $local = url('xmlrpc.php', array('absolute' => TRUE)); @@ -106,7 +106,7 @@ class BlogAPIModuleTestCase extends Drup $this->drupalGet('logout'); // Remove taxonmy vocab. - $this->drupalLoginUser($admin_user); + $this->drupalLogin($admin_user); $this->drupalPost('admin/content/taxonomy/edit/vocabulary/'. $vid, array(), t('Delete')); $this->drupalPost(NULL, array(), t('Delete')); Index: tests/functional/comment.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/comment.test,v retrieving revision 1.6 diff -u -p -r1.6 comment.test --- tests/functional/comment.test 22 Mar 2008 01:19:17 -0000 1.6 +++ tests/functional/comment.test 22 Mar 2008 01:28:27 -0000 @@ -29,7 +29,7 @@ class CommentModuleTestCase extends Drup $this->admin_user = $this->drupalCreateUserRolePerm(array('administer content types', 'administer comments', 'administer permissions')); $this->web_user = $this->drupalCreateUserRolePerm(array('access comments', 'post comments', 'create story content')); - $this->drupalLoginUser($this->web_user); + $this->drupalLogin($this->web_user); $this->node = $this->drupalCreateNode(array('type' => 'story')); $this->assertTrue($this->node, 'Story node created.'); $this->drupalGet('logout'); @@ -40,25 +40,25 @@ class CommentModuleTestCase extends Drup */ function testCommentInterface() { // Set comments to not have subject. - $this->drupalLoginUser($this->admin_user); + $this->drupalLogin($this->admin_user); $this->set_comment_preview(TRUE); $this->set_comment_subject(FALSE); $this->drupalGet('logout'); // Post comment without subject - $this->drupalLoginUser($this->web_user); + $this->drupalLogin($this->web_user); $this->drupalGet('comment/reply/'. $this->node->nid); $this->assertNoPattern('/(input)(.*?)(name="subject")/', 'Subject field not found.'); // Set comments to have subject and preview to required. $this->drupalGet('logout'); - $this->drupalLoginUser($this->admin_user); + $this->drupalLogin($this->admin_user); $this->set_comment_subject(true); $this->set_comment_preview(true); $this->drupalGet('logout'); // Create comment that requires preview. - $this->drupalLoginUser($this->web_user); + $this->drupalLogin($this->web_user); $comment = $this->post_comment($this->node, $this->randomName(), $this->randomName()); $this->assertTrue($this->comment_exists($comment), 'Comment found.'); @@ -74,7 +74,7 @@ class CommentModuleTestCase extends Drup // Delete comment and make sure that reply is also removed. $this->drupalGet('logout'); - $this->drupalLoginUser($this->admin_user); + $this->drupalLogin($this->admin_user); $this->delete_comment($comment); $this->drupalGet('node/'. $this->node->nid); @@ -87,19 +87,19 @@ class CommentModuleTestCase extends Drup */ function testFormOnPage() { // Enabled comment form on node page. - $this->drupalLoginUser($this->admin_user); + $this->drupalLogin($this->admin_user); $this->set_comment_form(TRUE); $this->drupalGet('logout'); // Submit comment through node form. - $this->drupalLoginUser($this->web_user); + $this->drupalLogin($this->web_user); $this->drupalGet('node/'. $this->node->nid); $form_comment = $this->post_comment(NULL, $this->randomName(), $this->randomName()); $this->assertTrue($this->comment_exists($form_comment), 'Form comment found.'); // Disable comment form on node page. $this->drupalGet('logout'); - $this->drupalLoginUser($this->admin_user); + $this->drupalLogin($this->admin_user); $this->set_comment_form(FALSE); } @@ -107,7 +107,7 @@ class CommentModuleTestCase extends Drup * Test anonymous comment functionality. */ function testAnonymous() { - $this->drupalLoginUser($this->admin_user); + $this->drupalLogin($this->admin_user); // Enabled anonymous user comments. $this->set_anonymous_user_comment(TRUE, TRUE); $this->set_comment_anonymous('0'); // Ensure that doesn't require contact info. @@ -118,7 +118,7 @@ class CommentModuleTestCase extends Drup $this->assertTrue($this->comment_exists($anonymous_comment1), 'Anonymous comment without contact info found.'); // Allow contact info. - $this->drupalLoginUser($this->admin_user); + $this->drupalLogin($this->admin_user); $this->set_comment_anonymous('1'); $this->drupalGet('logout'); @@ -130,7 +130,7 @@ class CommentModuleTestCase extends Drup $this->assertTrue($this->comment_exists($anonymous_comment2), 'Anonymous comment with contact info (optional) found.'); // Require contact info. - $this->drupalLoginUser($this->admin_user); + $this->drupalLogin($this->admin_user); $this->set_comment_anonymous('2'); $this->drupalGet('logout'); @@ -147,7 +147,7 @@ class CommentModuleTestCase extends Drup $this->assertTrue($this->comment_exists($anonymous_comment3), 'Anonymous comment with contact info (required) found.'); // Unpublish comment. - $this->drupalLoginUser($this->admin_user); + $this->drupalLogin($this->admin_user); $this->perform_comment_operation($anonymous_comment3, 'unpublish'); $this->drupalGet('admin/content/comment/approval'); @@ -177,7 +177,7 @@ class CommentModuleTestCase extends Drup $this->assertText(t('Your comment has been queued for moderation by site administrators and will be published after approval.'), 'Comment requires approval.'); // Get unaproved comment id. - $this->drupalLoginUser($this->admin_user); + $this->drupalLogin($this->admin_user); $anonymous_comment4 = $this->get_unaproved_comment($subject); $anonymous_comment4 = (object) array('id' => $anonymous_comment4, 'subject' => $subject, 'comment' => $body); $this->drupalGet('logout'); @@ -185,7 +185,7 @@ class CommentModuleTestCase extends Drup $this->assertFalse($this->comment_exists($anonymous_comment4), 'Anonymous comment was not published.'); // Approve comment. - $this->drupalLoginUser($this->admin_user); + $this->drupalLogin($this->admin_user); $this->perform_comment_operation($anonymous_comment4, 'publish', TRUE); $this->drupalGet('logout'); @@ -193,7 +193,7 @@ class CommentModuleTestCase extends Drup $this->assertTrue($this->comment_exists($anonymous_comment4), 'Anonymous comment visible.'); // Reset. - $this->drupalLoginUser($this->admin_user); + $this->drupalLogin($this->admin_user); $this->set_anonymous_user_comment(FALSE, FALSE); } Index: tests/functional/contact.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/contact.test,v retrieving revision 1.4 diff -u -p -r1.4 contact.test --- tests/functional/contact.test 22 Mar 2008 01:19:17 -0000 1.4 +++ tests/functional/contact.test 22 Mar 2008 01:28:27 -0000 @@ -25,7 +25,7 @@ class ContactModuleTestCase extends Drup function test_site_wide_contact() { // Create and login administative user. $admin_user = $this->drupalCreateUserRolePerm(array('administer site-wide contact form', 'administer permissions')); - $this->drupalLoginUser($admin_user); + $this->drupalLogin($admin_user); // Set settings. $edit = array(); @@ -70,7 +70,7 @@ class ContactModuleTestCase extends Drup $this->assertResponse(403, 'Access denied to anonymous user without permission.'); // Give anonymous user permission and see that page is viewable. - $this->drupalLoginUser($admin_user); + $this->drupalLogin($admin_user); $this->set_permission('anonymous user', array('access site-wide contact form' => TRUE)); $this->drupalGet('logout'); @@ -107,7 +107,7 @@ class ContactModuleTestCase extends Drup $this->assertWantedRaw(t('You cannot send more than %number messages per hour. Please try again later.', array('%number' => $edit['contact_hourly_threshold'])), 'Message threshold reached.'); // Delete created categories. - $this->drupalLoginUser($admin_user); + $this->drupalLogin($admin_user); $this->delete_categories(); } @@ -116,7 +116,7 @@ class ContactModuleTestCase extends Drup */ function atest_personal_contact() { $admin_user = $this->drupalCreateUserRolePerm(array('administer site-wide contact form')); - $this->drupalLoginUser($admin_user); + $this->drupalLogin($admin_user); // Enable the personal contact form. $edit = array(); @@ -132,7 +132,7 @@ class ContactModuleTestCase extends Drup $web_user1 = $this->drupalCreateUserRolePerm(array()); $web_user2 = $this->drupalCreateUserRolePerm(array()); - $this->drupalLoginUser($web_user1); + $this->drupalLogin($web_user1); $this->drupalGet('user/'. $web_user2->uid .'/contact'); $this->assertResponse(array(200), 'Access to personal contact form granted.'); @@ -145,7 +145,7 @@ class ContactModuleTestCase extends Drup $this->drupalGet('logout'); - $this->drupalLoginUser($admin_user); + $this->drupalLogin($admin_user); // Disable the personal contact form. $edit = array(); @@ -161,7 +161,7 @@ class ContactModuleTestCase extends Drup $web_user3 = $this->drupalCreateUserRolePerm(array()); $web_user4 = $this->drupalCreateUserRolePerm(array()); - $this->drupalLoginUser($web_user3); + $this->drupalLogin($web_user3); $this->drupalGet('user/'. $web_user4->uid .'/contact'); $this->assertResponse(array(403), 'Access to personal contact form denied.'); Index: tests/functional/filter.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/filter.test,v retrieving revision 1.3 diff -u -p -r1.3 filter.test --- tests/functional/filter.test 22 Mar 2008 01:19:17 -0000 1.3 +++ tests/functional/filter.test 22 Mar 2008 01:28:27 -0000 @@ -29,7 +29,7 @@ class FilterModuleTestCase extends Drupa $admin_user = $this->drupalCreateUserRolePerm(array('administer filters')); $web_user = $this->drupalCreateUserRolePerm(array('create page content')); - $this->drupalLoginUser($admin_user); + $this->drupalLogin($admin_user); list($filtered, $full) = $this->check_filter_formats(); @@ -110,7 +110,7 @@ class FilterModuleTestCase extends Drupa // Switch user. $this->drupalGet('logout'); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); $this->drupalGet('node/add/page'); $this->assert_format($full, 'Full HTML filter accessible.'); @@ -135,7 +135,7 @@ class FilterModuleTestCase extends Drupa // Switch user. $this->drupalGet('logout'); - $this->drupalLoginUser($admin_user); + $this->drupalLogin($admin_user); // Clean up. // Allowed tags Index: tests/functional/forum.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/forum.test,v retrieving revision 1.5 diff -u -p -r1.5 forum.test --- tests/functional/forum.test 22 Mar 2008 01:19:17 -0000 1.5 +++ tests/functional/forum.test 22 Mar 2008 01:28:27 -0000 @@ -85,7 +85,7 @@ class AddForumTest extends DrupalForumTe 'access administration pages', 'administer forums', )); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); // Create the container, all the assertions are handled in the function $container = $this->createForumContainer(); @@ -101,7 +101,7 @@ class AddForumTest extends DrupalForumTe 'access administration pages', 'administer forums', )); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); // Create the forum, all assertions are handled in the function $forum = $this->createForum(); @@ -126,7 +126,7 @@ class EditForumTaxonomyTest extends Drup 'access administration pages', 'administer taxonomy', )); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); $vid = variable_get('forum_nav_vocabulary', ''); $original_settings = taxonomy_vocabulary_load($vid); @@ -176,7 +176,7 @@ class AddTopicToForum extends DrupalForu 'administer forums', 'create forum content' )); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); // Generate a forum $forum = $this->createForum(); @@ -219,7 +219,7 @@ class AddTopicToForum extends DrupalForu 'administer forums', 'create forum content' )); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); // Create the container $container = $this->createForumContainer(); @@ -257,7 +257,7 @@ class AddTopicToForum extends DrupalForu 'create forum content', 'edit any forum content' )); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); $forum1 = $this->createForum(); $forum2 = $this->createForum(); @@ -314,7 +314,7 @@ class AddTopicToForum extends DrupalForu 'create forum content', 'edit any forum content' )); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); $forum1 = $this->createForum(); $forum2 = $this->createForum(); Index: tests/functional/locale.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/locale.test,v retrieving revision 1.4 diff -u -p -r1.4 locale.test --- tests/functional/locale.test 22 Mar 2008 01:19:17 -0000 1.4 +++ tests/functional/locale.test 22 Mar 2008 01:28:27 -0000 @@ -41,7 +41,7 @@ class LocaleModuleTest extends DrupalTes $translation = $this->randomName(16); // Add language. - $this->drupalLoginUser($admin_user); + $this->drupalLogin($admin_user); $edit = array ( 'langcode' => $langcode, 'name' => $name, @@ -63,7 +63,7 @@ class LocaleModuleTest extends DrupalTes $this->drupalGet('logout'); // Search for the name and translate it. - $this->drupalLoginUser($translate_user); + $this->drupalLogin($translate_user); $search = array ( 'string' => $name, 'language' => 'all', @@ -95,7 +95,7 @@ class LocaleModuleTest extends DrupalTes $this->drupalGet('logout'); // Delete the language - $this->drupalLoginUser($admin_user); + $this->drupalLogin($admin_user); $path = 'admin/settings/language/delete/'. $langcode; // This a confirm form, we do not need any fields changed. $this->drupalPost($path, array(), t('Delete')); @@ -109,7 +109,7 @@ class LocaleModuleTest extends DrupalTes $this->drupalGet('logout'); // Delete the name string. - $this->drupalLoginUser($translate_user); + $this->drupalLogin($translate_user); $this->drupalGet('admin/build/translate/delete/'. $lid); $this->assertText(t('The string has been removed.'), 'The string has been removed message.'); $this->drupalPost('admin/build/translate/search', $search, t('Search')); Index: tests/functional/menu.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/menu.test,v retrieving revision 1.3 diff -u -p -r1.3 menu.test --- tests/functional/menu.test 22 Mar 2008 01:19:17 -0000 1.3 +++ tests/functional/menu.test 22 Mar 2008 01:28:27 -0000 @@ -23,7 +23,7 @@ class MenuModuleTestCase extends Drupal function testCreateCheckDelete() { $web_user = $this->drupalCreateUserRolePerm(array('access content', 'administer menu', 'access administration pages',)); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); $mlid1 = $this->uiCreateLink(); $mlid2 = $this->uiCreateLink($mlid1); @@ -106,7 +106,7 @@ class MenuModuleCustomMenuTest extends M function testCreateCheckDelete() { $web_user = $this->drupalCreateUserRolePerm(array('access content', 'administer menu', 'access administration pages',)); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); $this->drupalGet('admin/build/menu/add'); $name = substr(md5($this->randomName(16)), 0, 20); @@ -157,7 +157,7 @@ class MenuModuleEnable extends DrupalTes function testMenuModuleEnable() { $web_user = $this->drupalCreateUserRolePerm(array('administer menu')); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); $this->drupalGet('admin/build/menu-customize/navigation'); $this->clickLink(t('edit'), 0); $url = $this->getUrl(); @@ -201,7 +201,7 @@ class MenuModuleReset extends DrupalTest function testMenuModuleReset() {; $web_user = $this->drupalCreateUserRolePerm(array('administer menu')); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); $form_state = array(); $menu['menu_name'] = 'navigation'; require_once drupal_get_path('module', 'menu') .'/menu.admin.inc'; @@ -262,7 +262,7 @@ class MenuModuleInvalidPath extends Drup function testMenuModuleInvalidPath() { $web_user = $this->drupalCreateUserRolePerm(array('administer menu')); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); foreach (array('-&-', 'admin/user/permissions') as $invalid_path) { $edit = array ( 'menu[link_path]' => $invalid_path, Index: tests/functional/node.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/node.test,v retrieving revision 1.5 diff -u -p -r1.5 node.test --- tests/functional/node.test 22 Mar 2008 01:19:17 -0000 1.5 +++ tests/functional/node.test 22 Mar 2008 01:28:27 -0000 @@ -51,7 +51,7 @@ class NodeRevisionsTest extends DrupalTe extract( $this->prepareRevisions() ); $test_user = $this->drupalCreateUserRolePerm(array('view revisions')); - $this->drupalLoginUser($test_user); + $this->drupalLogin($test_user); $this->drupalGet("node/$node->nid/revisions/$vid/view"); $this->assertText($text, 'Check to make sure correct revision text appears on "view revisions" page.'); @@ -65,7 +65,7 @@ class NodeRevisionsTest extends DrupalTe extract( $this->prepareRevisions(TRUE) ); $test_user = $this->drupalCreateUserRolePerm(array('view revisions')); - $this->drupalLoginUser($test_user); + $this->drupalLogin($test_user); $this->drupalGet("node/$node->nid/revisions"); $this->assertText($log, 'Check to make sure log message is properly displayed.'); @@ -79,7 +79,7 @@ class NodeRevisionsTest extends DrupalTe extract( $this->prepareRevisions() ); $test_user = $this->drupalCreateUserRolePerm(array('revert revisions', 'edit any page content')); - $this->drupalLoginUser($test_user); + $this->drupalLogin($test_user); $this->drupalPost("node/$node->nid/revisions/$vid/revert", array(), t('Revert')); $newnode = node_load($node->nid); $this->assertTrue(($text == $newnode->body), 'Check to make sure reversions occur properly'); @@ -94,7 +94,7 @@ class NodeRevisionsTest extends DrupalTe extract( $this->prepareRevisions() ); $test_user = $this->drupalCreateUserRolePerm(array('delete revisions', 'delete any page content')); - $this->drupalLoginUser($test_user); + $this->drupalLogin($test_user); $this->drupalPost("node/$node->nid/revisions/$vid/delete", array(), t('Delete')); $this->assertTrue(db_result(db_query('SELECT COUNT(vid) FROM {node_revisions} WHERE nid = %d and VID = %d', $node->nid, $vid)) == 0, 'Check to make sure revisions delete properly'); $this->cleanup($node->nid); @@ -275,7 +275,7 @@ class StoryEditTest extends DrupalTestCa $this->drupalVariableSet('node_options_story', array('status', 'promote')); /* Prepare a user to do the stuff */ $web_user = $this->drupalCreateUserRolePerm(array('edit own story content', 'create story content')); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); $edit = array( 'title' => '!SimpleTest! test title' . $this->randomName(20), 'body' => '!SimpleTest! test body' . $this->randomName(200), @@ -324,7 +324,7 @@ class StoryPreviewTest extends DrupalTes $this->drupalVariableSet('node_options_story', array('status', 'promote')); /* Prepare a user to do the stuff */ $web_user = $this->drupalCreateUserRolePerm(array('edit own story content', 'create story content')); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); $edit = array( 'title'=>'!SimpleTest! title' . $this->randomName(20), @@ -361,7 +361,7 @@ class PageCreationTest extends DrupalTe /* Prepare a user to do the stuff */ $web_user = $this->drupalCreateUserRolePerm(array('edit own page content', 'create page content')); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); $edit = array(); $edit['title'] = '!SimpleTest test node! ' . $this->randomName(10); @@ -402,7 +402,7 @@ class PageViewTest extends DrupalTestCas /* Prepare a user to request the node view */ $test_user = $this->drupalCreateUserRolePerm(array('access content')); - $this->drupalLoginUser($test_user); + $this->drupalLogin($test_user); $html = $this->drupalGet("node/$node->nid/edit"); $this->assertResponse(403); Index: tests/functional/path.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/path.test,v retrieving revision 1.5 diff -u -p -r1.5 path.test --- tests/functional/path.test 22 Mar 2008 01:19:17 -0000 1.5 +++ tests/functional/path.test 22 Mar 2008 01:28:27 -0000 @@ -20,7 +20,7 @@ class PathModuleTestCase extends DrupalT // create and login user $web_user = $this->drupalCreateUserRolePerm(array('edit own page content', 'create page content', 'administer url aliases', 'create url aliases')); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); } /** Index: tests/functional/poll.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/poll.test,v retrieving revision 1.5 diff -u -p -r1.5 poll.test --- tests/functional/poll.test 22 Mar 2008 01:19:17 -0000 1.5 +++ tests/functional/poll.test 22 Mar 2008 01:28:27 -0000 @@ -6,7 +6,7 @@ class PollTests extends DrupalTestCase { function pollCreate($standalone = TRUE) { $this->assertTrue(TRUE, 'Poll create' . $standalone); $web_user = $this->drupalCreateUserRolePerm(array('create poll content', 'access content')); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); $title = $this->randomName(); $edit = array ( 'title' => $title, @@ -81,7 +81,7 @@ class PollVoteTest extends PollTests { $this->pollCreate(FALSE); $this->drupalGet('logout'); $web_user = $this->drupalCreateUserRolePerm(array('cancel own vote', 'inspect all votes', 'vote on polls', 'access content')); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); $edit = array ( 'choice' => '1', ); Index: tests/functional/system.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/system.test,v retrieving revision 1.5 diff -u -p -r1.5 system.test --- tests/functional/system.test 22 Mar 2008 01:19:17 -0000 1.5 +++ tests/functional/system.test 22 Mar 2008 01:28:27 -0000 @@ -49,7 +49,7 @@ class EnableCoreModuleTest extends Drupa 'access administration pages', 'administer site configuration', )); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); $edit = array(); // We temporarily disable any modules we're testing so that we can re-enable them for testing @@ -115,7 +115,7 @@ class EnableModuleWithoutDependencyTest 'access administration pages', 'administer site configuration', )); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); $edit = array ( 'status[forum]' => 'forum', @@ -187,7 +187,7 @@ class DisableUninstallCoreModuleTest ext 'access administration pages', 'administer site configuration', )); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); // Disable/uninstall the given modules: we keep every other module enabled // We do this loop because for each level of dependency, we need one more request Index: tests/functional/taxonomy.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/taxonomy.test,v retrieving revision 1.5 diff -u -p -r1.5 taxonomy.test --- tests/functional/taxonomy.test 22 Mar 2008 01:19:17 -0000 1.5 +++ tests/functional/taxonomy.test 22 Mar 2008 01:28:27 -0000 @@ -280,7 +280,7 @@ class TaxonomyTestNodeApi extends Drupal // create test user and login $perm = array('access content', 'create story content', 'edit own story content', 'delete own story content'); $account = $this->drupalCreateUserRolePerm($perm); - $this->drupalLoginUser($account); + $this->drupalLogin($account); // why is this printing out the user profile page? // go to node/add/story Index: tests/functional/translation.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/translation.test,v retrieving revision 1.4 diff -u -p -r1.4 translation.test --- tests/functional/translation.test 22 Mar 2008 01:19:17 -0000 1.4 +++ tests/functional/translation.test 22 Mar 2008 01:28:27 -0000 @@ -25,7 +25,7 @@ class TranslationModuleTestCase extends $admin_user = $this->drupalCreateUserRolePerm(array('administer languages', 'administer content types', 'access administration pages')); $translator = $this->drupalCreateUserRolePerm(array('create story content', 'edit own story content', 'translate content')); - $this->drupalLoginUser($admin_user); + $this->drupalLogin($admin_user); // Add languages. $this->add_language('en'); @@ -36,7 +36,7 @@ class TranslationModuleTestCase extends $this->assertWantedRaw(t('The content type %type has been updated.', array('%type' => 'Story')), 'Story content type has been updated.'); $this->drupalGet('logout'); - $this->drupalLoginUser($translator); + $this->drupalLogin($translator); // Create story in English. $node_title = 'Test Translation '. $this->randomName(); Index: tests/functional/trigger.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/trigger.test,v retrieving revision 1.4 diff -u -p -r1.4 trigger.test --- tests/functional/trigger.test 22 Mar 2008 01:19:17 -0000 1.4 +++ tests/functional/trigger.test 22 Mar 2008 01:28:27 -0000 @@ -38,7 +38,7 @@ class ActionsContentTest extends Drupal // Test 1: Assign an action to a trigger, then pull the trigger, and make sure the actions fire. (Wow, those metaphors work out nicely). $test_user = $this->drupalCreateUserRolePerm(array('administer actions', 'create page content')); - $this->drupalLoginUser($test_user); + $this->drupalLogin($test_user); // Set action id to "publish post". $edit = array('aid' => $hash); Index: tests/functional/upload.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/upload.test,v retrieving revision 1.6 diff -u -p -r1.6 upload.test --- tests/functional/upload.test 22 Mar 2008 01:19:17 -0000 1.6 +++ tests/functional/upload.test 22 Mar 2008 01:28:27 -0000 @@ -26,7 +26,7 @@ class upload_module_test_case extends Dr $admin_user = $this->drupalCreateUserRolePerm(array('administer site configuration')); $web_user = $this->drupalCreateUserRolePerm(array('access content', 'edit any page content', 'upload files', 'view uploaded files')); - $this->drupalLoginUser($admin_user); + $this->drupalLogin($admin_user); // Setup upload settings. $edit = array(); @@ -38,7 +38,7 @@ class upload_module_test_case extends Dr $this->assertText('The configuration options have been saved.', 'Upload setting saved.'); $this->drupalGet('logout'); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); // Create a node and attempt to attach files. $node = $this->drupalCreateNode(); @@ -150,7 +150,7 @@ class UploadPictureTests extends DrupalT /* Prepare a user to do the stuff */ $user = $this->drupalCreateUserRolePerm(array('access content')); - $this->drupalLoginUser($user); + $this->drupalLogin($user); // not a image $img_path = realpath(drupal_get_path('module', 'simpletest'). "/tests/functional/upload.test"); @@ -185,7 +185,7 @@ class UploadPictureTests extends DrupalT /* Prepare a user to do the stuff */ $user = $this->drupalCreateUserRolePerm(array('access content')); - $this->drupalLoginUser($user); + $this->drupalLogin($user); // changing actual setting; $old_dim = variable_get('user_picture_dimensions', '85x85'); @@ -241,7 +241,7 @@ class UploadPictureTests extends DrupalT /* Prepare a user to do the stuff */ $user = $this->drupalCreateUserRolePerm(array('access content')); - $this->drupalLoginUser($user); + $this->drupalLogin($user); // changing actual setting; $old_dim = variable_get('user_picture_dimensions', '85x85'); @@ -295,7 +295,7 @@ class UploadPictureTests extends DrupalT /* Prepare a user to do the stuff */ $user = $this->drupalCreateUserRolePerm(array('access content')); - $this->drupalLoginUser($user); + $this->drupalLogin($user); // changing actual setting; $old_dim = variable_get('user_picture_dimensions', '85x85'); @@ -344,7 +344,7 @@ class UploadPictureTests extends DrupalT /* Prepare a user to do the stuff */ $user = $this->drupalCreateUserRolePerm(array('access content')); - $this->drupalLoginUser($user); + $this->drupalLogin($user); // changing actual setting; $old_dim = variable_get('user_picture_dimensions', '85x85'); @@ -390,7 +390,7 @@ class UploadPictureTests extends DrupalT /* Prepare a user to do the stuff */ $user = $this->drupalCreateUserRolePerm(array('access content')); - $this->drupalLoginUser($user); + $this->drupalLogin($user); // changing actual setting; $old_dim = variable_get('user_picture_dimensions', '85x85'); Index: tests/functional/user.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/user.test,v retrieving revision 1.5 diff -u -p -r1.5 user.test --- tests/functional/user.test 22 Mar 2008 01:19:17 -0000 1.5 +++ tests/functional/user.test 22 Mar 2008 01:28:27 -0000 @@ -250,7 +250,7 @@ class UserDeleteTest extends DrupalTestC $user_to_delete = user_load($edit); $uid = $user_to_delete->uid; $web_user = $this->drupalCreateUserRolePerm(array('administer users')); - $this->drupalLoginUser($web_user); + $this->drupalLogin($web_user); $this->drupalGet(url('user/'. $uid .'/edit', array('absolute' => TRUE))); $this->drupalPost(NULL, array(), t('Delete')); $this->assertWantedRaw(t('Are you sure you want to delete the account %name?', array('%name' => $name)), 'Confirm title');