Commit 8328aac6 authored by Sascha Grossenbacher's avatar Sascha Grossenbacher Committed by Neslee Canil Pinto
Browse files

Issue #3287420 by Project Update Bot, Berdir: Automated Drupal 10 compatibility fixes

parent 0b93d527
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -27,6 +27,6 @@
    "source": "https://git.drupalcode.org/project/extlink"
  },
  "require": {
    "drupal/core": "^8 || ^9"
    "drupal/core": "^8 || ^9 || ^10"
  }
}
+1 −1
Original line number Diff line number Diff line
@@ -4,4 +4,4 @@ description: 'Modify behavior and appearance of external links.'
package: User interface
core: 8.x
configure: extlink_admin.settings
core_version_requirement: ^8 || ^9
core_version_requirement: ^8 || ^9 || ^10
+0 −1
Original line number Diff line number Diff line
@@ -9,7 +9,6 @@ drupal.extlink:
    - core/jquery
    - core/drupal
    - core/drupalSettings
    - core/jquery.once

extlink.settings:
  js:
+2 −2
Original line number Diff line number Diff line
@@ -49,9 +49,9 @@ class ExternalSettingsJsController extends ControllerBase {
})(drupalSettings);
EOT;

    return CacheableResponse::create($js, 200, [
    return (new CacheableResponse($js, 200, [
      'Content-Type' => 'application/javascript',
    ])->addCacheableDependency($config);
    ]))->addCacheableDependency($config);
  }

  /**
+4 −4
Original line number Diff line number Diff line
@@ -19,11 +19,11 @@ class ExtlinkAdminTest extends ExtlinkTestBase {
  public function testAdminAccess() {
    $this->drupalLogin($this->normalUser);
    $this->drupalGet(self::EXTLINK_ADMIN_PATH);
    $this->assertSession()->pageTextContains($this->t('Access denied'), 'Normal users should not be able to access the External Links admin pages', 'External Links');
    $this->assertSession()->pageTextContains($this->t('Access denied'));

    $this->drupalLogin($this->adminUser);
    $this->drupalGet(self::EXTLINK_ADMIN_PATH);
    $this->assertSession()->pageTextNotContains($this->t('Access denied'), 'Admin users should be able to access the External Links admin pages', 'External Links');
    $this->assertSession()->pageTextNotContains($this->t('Access denied'));
  }

  /**
@@ -33,12 +33,12 @@ class ExtlinkAdminTest extends ExtlinkTestBase {
    $this->drupalLogin($this->adminUser);
    $this->drupalGet(self::EXTLINK_ADMIN_PATH);
    $this->assertSession()->checkboxNotChecked('extlink_exclude_admin_routes');
    $this->assertRaw('/extlink/extlink.js');
    $this->assertSession()->responseContains('/extlink/extlink.js');

    // Disable Extlink on admin routes.
    $this->drupalGet(self::EXTLINK_ADMIN_PATH);
    $this->submitForm(['extlink_exclude_admin_routes' => TRUE], 'Save configuration');
    $this->assertNoRaw('/extlink/extlink.js');
    $this->assertSession()->responseNotContains('/extlink/extlink.js');
  }

}
Loading