Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/media/tests/src/FunctionalJavascript/MediaSourceFileTest.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | a9cd425dd02b |
children |
comparison
equal
deleted
inserted
replaced
4:a9cd425dd02b | 5:12f9dff5fda9 |
---|---|
78 $this->assertSame('8', $media->get('field_string_file_size')->value); | 78 $this->assertSame('8', $media->get('field_string_file_size')->value); |
79 $this->assertSame('text/plain', $media->get('field_string_mime_type')->value); | 79 $this->assertSame('text/plain', $media->get('field_string_mime_type')->value); |
80 | 80 |
81 // Test the MIME type icon. | 81 // Test the MIME type icon. |
82 $icon_base = \Drupal::config('media.settings')->get('icon_base_uri'); | 82 $icon_base = \Drupal::config('media.settings')->get('icon_base_uri'); |
83 file_unmanaged_copy($icon_base . '/generic.png', $icon_base . '/text--plain.png'); | 83 \Drupal::service('file_system')->copy($icon_base . '/generic.png', $icon_base . '/text--plain.png'); |
84 $this->drupalGet("media/add/{$media_type_id}"); | 84 $this->drupalGet("media/add/{$media_type_id}"); |
85 $page->attachFileToField("files[{$source_field_id}_0]", \Drupal::service('file_system')->realpath($test_filepath)); | 85 $page->attachFileToField("files[{$source_field_id}_0]", \Drupal::service('file_system')->realpath($test_filepath)); |
86 $result = $assert_session->waitForButton('Remove'); | 86 $result = $assert_session->waitForButton('Remove'); |
87 $this->assertNotEmpty($result); | 87 $this->assertNotEmpty($result); |
88 $page->pressButton('Save'); | 88 $page->pressButton('Save'); |