Projet

Général

Profil

Révision 5d12d676

Ajouté par Assos Assos il y a environ 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/views/tests/user/views_handler_field_user_name.test
43 43
    $anon_name = variable_get('anonymous', t('Anonymous'));
44 44
    $view->result[0]->users_name = '';
45 45
    $render = $view->field['name']->advanced_render($view->result[0]);
46
    $this->assertIdentical($render, $anon_name , 'For user0 it should use the default anonymous name by default.');
46
    $this->assertIdentical($render, $anon_name, 'For user0 it should use the default anonymous name by default.');
47 47

  
48 48
    $view->field['name']->options['overwrite_anonymous'] = TRUE;
49 49
    $anon_name = $view->field['name']->options['anonymous_text'] = $this->randomName();
50 50
    $render = $view->field['name']->advanced_render($view->result[0]);
51
    $this->assertIdentical($render, $anon_name , 'For user0 it should use the configured anonymous text if overwrite_anonymous is checked.');
52

  
51
    $this->assertIdentical($render, $anon_name, 'For user0 it should use the configured anonymous text if overwrite_anonymous is checked.');
53 52

  
54 53
  }
55 54
  function view_user_name() {
56
    $view = new view;
55
    $view = new view();
57 56
    $view->name = 'test_views_handler_field_user_name';
58 57
    $view->description = '';
59 58
    $view->tag = 'default';
......
93 92

  
94 93
    return $view;
95 94
  }
95

  
96 96
}

Formats disponibles : Unified diff