Verified Commit eeb7e60c authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3439904 by thebumik, pradhumanjain2311, smustgrave,...

Issue #3439904 by thebumik, pradhumanjain2311, smustgrave, kristiaanvandeneynde, vensires, alexpott, larowlan: Fix Path tests that rely on UID1's super user behavior
parent 1c017c0e
Loading
Loading
Loading
Loading
Loading
+24 −9
Original line number Diff line number Diff line
@@ -31,14 +31,6 @@ class PathContentModerationTest extends BrowserTestBase {
    'content_translation',
  ];

  /**
   * {@inheritdoc}
   *
   * @todo Remove and fix test to not rely on super user.
   * @see https://www.drupal.org/project/drupal/issues/3437620
   */
  protected bool $usesSuperUserAccessPolicy = TRUE;

  /**
   * {@inheritdoc}
   */
@@ -63,7 +55,30 @@ protected function setUp(): void {
    $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'moderated');
    $workflow->save();

    $this->drupalLogin($this->rootUser);
    $this->drupalLogin($this->drupalCreateUser([
      'administer workflows',
      'access administration pages',
      'administer content types',
      'administer content translation',
      'administer nodes',
      'view latest version',
      'view any unpublished content',
      'access content overview',
      'use editorial transition create_new_draft',
      'use editorial transition publish',
      'use editorial transition archive',
      'use editorial transition archived_draft',
      'use editorial transition archived_published',
      'administer languages',
      'administer site configuration',
      'administer url aliases',
      'create url aliases',
      'view the administration theme',
      'translate any entity',
      'create content translations',
      'create moderated content',
      'edit own moderated content',
    ]));

    // Enable URL language detection and selection.
    $edit = ['language_interface[enabled][language-url]' => 1];