Projet

Général

Profil

Révision 30d5b9c5

Ajouté par Mathieu Schiano Di Schiabica il y a environ 8 ans

Update to 7.42

Voir les différences:

drupal7/modules/image/image.test
201 201
    $this->assertResponse(404, 'Accessing an image style URL with a source image that does not exist provides a 404 error response.');
202 202
  }
203 203

  
204
  /**
205
   * Test that we do not pass an array to drupal_add_http_header.
206
   */
207
  function testImageContentTypeHeaders() {
208
    $files = $this->drupalGetTestFiles('image');
209
    $file = array_shift($files);
210
    // Copy the test file to private folder.
211
    $private_file = file_copy($file, 'private://', FILE_EXISTS_RENAME);
212
    // Tell image_module_test module to return the headers we want to test.
213
    variable_set('image_module_test_invalid_headers', $private_file->uri);
214
    // Invoke image_style_deliver so it will try to set headers.
215
    $generated_url = image_style_url($this->style_name, $private_file->uri);
216
    $this->drupalGet($generated_url);
217
    variable_del('image_module_test_invalid_headers');
218
  }
219

  
204 220
  /**
205 221
   * Test image_style_url().
206 222
   */

Formats disponibles : Unified diff