You are here

function PathautoFunctionalTestCase::testUserOperations in Pathauto 7

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

Test user operations.

File

./pathauto.test, line 711
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/people', $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);
}