Commit 058e58d7 authored by Project Update Bot's avatar Project Update Bot Committed by Adrian Cid Almaguer
Browse files

Issue #3286765 by Project Update Bot, joshua1234511, adriancid: Automated...

Issue #3286765 by Project Update Bot, joshua1234511, adriancid: Automated Drupal 10 compatibility fixes
parent be44c615
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -23,6 +23,6 @@
    "source": "http://cgit.drupalcode.org/contribute"
  },
  "require": {
    "drupal/core": "^8.7.7 || ^9.0"
    "drupal/core": "^9.3 || ^10"
  }
}
+1 −1
Original line number Diff line number Diff line
@@ -3,6 +3,6 @@ description: Encourages people to join and contribute to the Drupal community.
package: Community

type: module
core_version_requirement: ^8.7.7 || ^9.0
core_version_requirement: ^9.3 || ^10

configure: contribute.settings
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ function contribute_page_attachments(&$page) {

  $contribution = $contribute_manager->getContribution();
  if ($contribution  && !empty($contribution['status'])) {
    $url = base_path() . drupal_get_path('module', 'contribute') . '/images/icons/drupal.svg';
    $url = base_path() . \Drupal::service('extension.list.module')->getPath('contribute') . '/images/icons/drupal.svg';
    $value .= '#contribute-info-contribution:before {background-image: url(' . $url . ')}';
  }
  $page['#attached']['html_head'][] = [
+7 −4
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ class ContributeFunctionalTest extends BrowserTestBase {
  /**
   * {@inheritdoc}
   */
  public static $modules = ['contribute'];
  protected static $modules = ['contribute'];

  /**
   * Test get.
@@ -40,20 +40,23 @@ class ContributeFunctionalTest extends BrowserTestBase {
      'account_type' => 'user',
      'user_id' => 'jrockowitz',
    ];
    $this->drupalPostForm('/admin/reports/status/contribute/configure', $edit, $this->t('Save'));
    $this->drupalGet('/admin/reports/status/contribute/configure');
    $this->submitForm($edit, $this->t('Save'));
    $this->assertSession()->responseContains('Community information has been saved.');
    $this->assertSession()->responseContains('Community information');
    $this->assertSession()->responseNotContains('When you <a href="https://register.drupal.org/user/register">create a Drupal.org account</a>, you gain access to a whole ecosystem of Drupal.org sites and services.');
    $this->assertSession()->responseContains('<strong><a href="https://www.drupal.org/u/jrockowitz">Jacob Rockowitz</a></strong>');
    $this->drupalGet('/admin/reports/status/contribute/configure');

    // Check that 'Community information' can be cleared.
    $this->drupalPostForm('/admin/reports/status/contribute/configure', [], $this->t('Clear'));
    $this->submitForm([], $this->t('Clear'));
    $this->assertSession()->responseContains('Community information has been cleared.');
    $this->assertSession()->responseNotContains('<strong><a href="https://www.drupal.org/u/jrockowitz">Jacob Rockowitz</a></strong>');

    // Check that 'Community information' can be disabled.
    $edit = ['disable' => TRUE];
    $this->drupalPostForm('/admin/reports/status/contribute/configure', $edit, $this->t('Save'));
    $this->drupalGet('/admin/reports/status/contribute/configure');
    $this->submitForm($edit, $this->t('Save'));
    $this->assertSession()->responseContains('Community information has been disabled.');

    // Check that 'Community information' can be remove.