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_user_argument_default.test
9 9
 * Tests views user argument default plugin.
10 10
 */
11 11
class ViewsUserArgumentDefault extends ViewsSqlTest {
12

  
13
  /**
14
   *
15
   */
12 16
  public static function getInfo() {
13 17
    return array(
14 18
      'name' => 'Tests user argument default plugin',
......
17 21
    );
18 22
  }
19 23

  
24
  /**
25
   *
26
   */
20 27
  public function test_plugin_argument_default_current_user() {
21 28
    // Create a user to test.
22 29
    $account = $this->drupalCreateUser();
23 30

  
24
    // Switch the user, we have to check the global user too, because drupalLogin is only for the simpletest browser.
31
    // Switch the user, we have to check the global user too, because
32
    // drupalLogin is only for the simpletest browser.
25 33
    $this->drupalLogin($account);
26 34
    global $user;
27 35
    $admin = $user;
......
40 48
    drupal_save_session(TRUE);
41 49
  }
42 50

  
51
  /**
52
   *
53
   */
43 54
  function view_plugin_argument_default_current_user() {
44
    $view = new view;
55
    $view = new view();
45 56
    $view->name = 'test_plugin_argument_default_current_user';
46 57
    $view->description = '';
47 58
    $view->tag = '';
......
87 98

  
88 99
    return $view;
89 100
  }
101

  
90 102
}

Formats disponibles : Unified diff