public function test_plugin_argument_default_current_user() {
// Create a user to test.
$account = $this
->drupalCreateUser();
// Switch the user, we have to check the global user too, because drupalLogin is only for the simpletest browser.
$this
->drupalLogin($account);
global $user;
$admin = $user;
drupal_save_session(FALSE);
$user = $account;
$view = views_get_view('test_plugin_argument_default_current_user');
$view
->initHandlers();
$this
->assertEqual($view->argument['null']
->getDefaultArgument(), $account->uid, 'Uid of the current user is used.');
// Switch back.
$user = $admin;
drupal_save_session(TRUE);
}