comparison core/modules/media/tests/src/Kernel/MediaKernelTestBase.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 129ea1e6d783
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
107 ])->save(); 107 ])->save();
108 return $media_type; 108 return $media_type;
109 } 109 }
110 110
111 /** 111 /**
112 * Helper to generate media entity. 112 * Helper to generate a media item.
113 * 113 *
114 * @param string $filename 114 * @param string $filename
115 * String filename with extension. 115 * String filename with extension.
116 * @param \Drupal\media\MediaTypeInterface $media_type 116 * @param \Drupal\media\MediaTypeInterface $media_type
117 * The the media type. 117 * The the media type.
118 * 118 *
119 * @return \Drupal\media\Entity\Media 119 * @return \Drupal\media\Entity\Media
120 * A media entity. 120 * A media item.
121 */ 121 */
122 protected function generateMedia($filename, MediaTypeInterface $media_type) { 122 protected function generateMedia($filename, MediaTypeInterface $media_type) {
123 vfsStream::setup('drupal_root'); 123 vfsStream::setup('drupal_root');
124 vfsStream::create([ 124 vfsStream::create([
125 'sites' => [ 125 'sites' => [