Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / file / tests / src / Functional / FileFieldTestBase.php
index f3d1c22b460a5835c1cb13becb845216798e8845..dc2e8becc139c126b2e5d4884b461d166cb792b4 100644 (file)
@@ -7,6 +7,7 @@ use Drupal\field\Entity\FieldConfig;
 use Drupal\file\FileInterface;
 use Drupal\Tests\BrowserTestBase;
 use Drupal\file\Entity\File;
+use Drupal\Tests\TestFileCreationTrait;
 
 /**
  * Provides methods specifically for testing File module's field handling.
@@ -14,6 +15,9 @@ use Drupal\file\Entity\File;
 abstract class FileFieldTestBase extends BrowserTestBase {
 
   use FileFieldCreationTrait;
+  use TestFileCreationTrait {
+    getTestFiles as drupalGetTestFiles;
+  }
 
   /**
   * Modules to enable.
@@ -156,7 +160,7 @@ abstract class FileFieldTestBase extends BrowserTestBase {
         $edit[$name][] = $file_path;
       }
     }
-    $this->drupalPostForm("node/$nid/edit", $edit, t('Save and keep published'));
+    $this->drupalPostForm("node/$nid/edit", $edit, t('Save'));
 
     return $nid;
   }
@@ -172,7 +176,7 @@ abstract class FileFieldTestBase extends BrowserTestBase {
     ];
 
     $this->drupalPostForm('node/' . $nid . '/edit', [], t('Remove'));
-    $this->drupalPostForm(NULL, $edit, t('Save and keep published'));
+    $this->drupalPostForm(NULL, $edit, t('Save'));
   }
 
   /**
@@ -185,7 +189,7 @@ abstract class FileFieldTestBase extends BrowserTestBase {
     ];
 
     $this->drupalPostForm('node/' . $nid . '/edit', [], t('Remove'));
-    $this->drupalPostForm(NULL, $edit, t('Save and keep published'));
+    $this->drupalPostForm(NULL, $edit, t('Save'));
   }
 
   /**