Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / media / tests / src / Functional / MediaRevisionTest.php
index b8ff7c556cd1f0e166d7d205d79808fac8de53c8..265e50fcb84fafcc7d59b5cff07d49e4a8b1cff4 100644 (file)
@@ -80,6 +80,8 @@ class MediaRevisionTest extends MediaFunctionalTestBase {
     $uri = 'temporary://foo.txt';
     file_put_contents($uri, $this->randomString(128));
 
+    $this->createMediaType(['bundle' => 'file', 'new_revision' => TRUE], 'file');
+
     // Create a media item.
     $this->drupalGet('/media/add/file');
     $page = $this->getSession()->getPage();
@@ -117,6 +119,8 @@ class MediaRevisionTest extends MediaFunctionalTestBase {
   public function testImageMediaRevision() {
     $assert = $this->assertSession();
 
+    $this->createMediaType(['bundle' => 'image', 'new_revision' => TRUE], 'image');
+
     /** @var \Drupal\field\FieldConfigInterface $field */
     // Disable the alt text field, because this is not a JavaScript test and
     // the alt text field will therefore not appear without a full page refresh.