Projet

Général

Profil

Révision ef1afbb9

Ajouté par Assos Assos il y a plus de 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/views/tests/views_ajax.test
73 73
    $this->assertEqual($drupal_settings['views']['ajaxViews'][$view_entry]['view_name'], 'test_ajax_view', 'The view\'s ajaxViews array entry has the correct \'view_name\' key.');
74 74
    $this->assertEqual($drupal_settings['views']['ajaxViews'][$view_entry]['view_display_id'], 'page_1', 'The view\'s ajaxViews array entry has the correct \'view_display_id\' key.');
75 75

  
76
    $post = [
76
    $post = array(
77 77
      'view_name' => 'test_ajax_view',
78 78
      'view_display_id' => 'page_1',
79
    ];
79
    );
80 80

  
81 81
    $response = $this->simpleAjaxPost('views/ajax', 'application/json', $post);
82 82
    $data = drupal_json_decode($response);
......
91 91
    $result = $this->xpath('//div[contains(@class, "views-row")]');
92 92
    $this->assertEqual(count($result), 2, 'Ensure that two items are rendered in the HTML.');
93 93

  
94
    $post = [
94
    $post = array(
95 95
      'view_name' => 'test_noajax_view',
96 96
      'view_display_id' => 'default',
97
    ];
97
    );
98 98

  
99 99
    $response = $this->simpleAjaxPost('views/ajax', 'application/json', $post);
100 100
    $data = drupal_json_decode($response);

Formats disponibles : Unified diff