Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / profiles / demo_umami / tests / src / Functional / DemoUmamiProfileTest.php
index f6025fd6034939744f730636ae90cb979dbd22ce..e27c6a19a3e7ff17aeb6eae79e394bb5fa19d3a5 100644 (file)
@@ -77,6 +77,9 @@ class DemoUmamiProfileTest extends BrowserTestBase {
           'filter.format.basic_html' => ['roles:', '  - authenticated'],
           'filter.format.full_html' => ['roles:', '  - administrator'],
           'filter.format.restricted_html' => ['roles:', '  - anonymous'],
+          // The system.site config is overwritten during tests by
+          // FunctionalTestSetupTrait::installParameters().
+          'system.site' => ['uuid:', 'name:', 'mail:'],
         ]);
       }
       else {
@@ -89,7 +92,12 @@ class DemoUmamiProfileTest extends BrowserTestBase {
    * Tests the successful editing of nodes by admin.
    */
   public function testEditNodesByAdmin() {
-    $account = $this->drupalCreateUser(['administer nodes', 'edit any recipe content']);
+    $permissions = [
+      'administer nodes',
+      'edit any recipe content',
+      'use editorial transition create_new_draft',
+    ];
+    $account = $this->drupalCreateUser($permissions);
     $this->drupalLogin($account);
     $webassert = $this->assertSession();
 
@@ -122,10 +130,11 @@ class DemoUmamiProfileTest extends BrowserTestBase {
   public function testDemonstrationWarningMessage() {
     $permissions = [
       'access content overview',
+      'access toolbar',
       'administer nodes',
-      'create recipe content',
       'edit any recipe content',
-      'access toolbar',
+      'create recipe content',
+      'use editorial transition create_new_draft',
     ];
     $account = $this->drupalCreateUser($permissions);
     $this->drupalLogin($account);