Mercurial > hg > isophonics-drupal-site
comparison core/modules/image/src/Tests/ImageFieldDefaultImagesTest.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
303 ['@fid' => $default_images['field2']->id()] | 303 ['@fid' => $default_images['field2']->id()] |
304 ) | 304 ) |
305 ); | 305 ); |
306 | 306 |
307 $non_image = $this->drupalGetTestFiles('text'); | 307 $non_image = $this->drupalGetTestFiles('text'); |
308 $this->drupalPostForm(NULL, ['files[settings_default_image_uuid]' => drupal_realpath($non_image[0]->uri)], t("Upload")); | 308 $this->drupalPostForm(NULL, ['files[settings_default_image_uuid]' => \Drupal::service('file_system')->realpath($non_image[0]->uri)], t("Upload")); |
309 $this->assertText('The specified file text-0.txt could not be uploaded.'); | 309 $this->assertText('The specified file text-0.txt could not be uploaded.'); |
310 $this->assertText('Only files with the following extensions are allowed: png gif jpg jpeg.'); | 310 $this->assertText('Only files with the following extensions are allowed: png gif jpg jpeg.'); |
311 | 311 |
312 // Confirm the default image is shown on the node form. | 312 // Confirm the default image is shown on the node form. |
313 $file = File::load($default_images['field_storage_new']->id()); | 313 $file = File::load($default_images['field_storage_new']->id()); |