You are here

function PathautoFunctionalTestCase::testUserOperations in Pathauto 6.2

Same name and namespace in other branches
  1. 6 pathauto.test \PathautoFunctionalTestCase::testUserOperations()
  2. 7 pathauto.test \PathautoFunctionalTestCase::testUserOperations()

Test user operations.

File

./pathauto.test, line 572
Functionality tests for Pathauto.

Class

PathautoFunctionalTestCase
Test basic pathauto functionality.

Code

function testUserOperations() {
  $account = $this
    ->drupalCreateUser();

  // Delete all current URL aliases.
  $this
    ->deleteAllAliases();
  $edit = array(
    'operation' => 'pathauto_update_alias',
    "accounts[{$account->uid}]" => TRUE,
  );
  $this
    ->drupalPost('admin/user/user', $edit, t('Update'));
  $this
    ->assertText('Updated URL alias for 1 user account.');
  $this
    ->assertEntityAlias('user', $account, 'users/' . drupal_strtolower($account->name));
  $this
    ->assertEntityAlias('user', $this->admin_user, 'user/' . $this->admin_user->uid);
}