Commit 8ac1cf2d authored by Fathima Nazeeha Asmat's avatar Fathima Nazeeha Asmat Committed by Scott Euser
Browse files

Issue #3298089 by fathima.asmat, Project Update Bot: Automated Drupal 10 compatibility fixes

parent e3ac1d40
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
name: Site Settings and Labels Type Permissions
type: module
description: 'Allows users to configure permissions for individual Site Settings types.'
core: 8.x
core_version_requirement: ^8 || ^9
core_version_requirement: ^8 || ^9 || ^10
package: Custom

dependencies:
+24 −23
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ class SiteSettingTypePermissionsUiTest extends BrowserTestBase {
   *
   * @var array
   */
  public static $modules = [
  protected static $modules = [
    'site_settings',
    'site_settings_sample_data',
    'site_settings_type_permissions',
@@ -60,15 +60,15 @@ class SiteSettingTypePermissionsUiTest extends BrowserTestBase {
    $this->drupalGet('admin/content/site-settings');

    // Make sure the fieldsets match.
    $this->assertRaw('<strong>Other</strong>');
    $this->assertNoRaw('<strong>Images</strong>');
    $this->assertSession()->responseContains('<strong>Other</strong>');
    $this->assertSession()->responseNotContains('<strong>Images</strong>');

    // Make sure the test plain text is as expected.
    $this->assertText('Test plain text');
    $this->assertSession()->pageTextContains('Test plain text');

    // Make sure the test multiple entries and fields contents are as expected.
    $this->assertText('Test multiple entries and fields name 1');
    $this->assertText('Test multiple entries and fields name 2');
    $this->assertSession()->pageTextContains('Test multiple entries and fields name 1');
    $this->assertSession()->pageTextContains('Test multiple entries and fields name 2');

    $this->drupalLogout();

@@ -86,26 +86,26 @@ class SiteSettingTypePermissionsUiTest extends BrowserTestBase {
    $this->drupalGet('admin/content/site-settings');

    // Make sure the fieldsets match.
    $this->assertRaw('<strong>Other</strong>');
    $this->assertNoRaw('<strong>Images</strong>');
    $this->assertSession()->responseContains('<strong>Other</strong>');
    $this->assertSession()->responseNotContains('<strong>Images</strong>');

    // Make sure the test plain text is as expected.
    $this->assertText('Test plain text');
    $this->assertSession()->pageTextContains('Test plain text');

    // Make sure the test multiple entries and fields contents are as expected.
    $this->assertText('Test multiple entries and fields name 1');
    $this->assertText('Test multiple entries and fields name 2');
    $this->assertSession()->pageTextContains('Test multiple entries and fields name 1');
    $this->assertSession()->pageTextContains('Test multiple entries and fields name 2');

    // Click edit link.
    $this->clickLink('Edit', 0);
    $this->assertText('Edit Test plain text name');
    $this->assertSession()->pageTextContains('Edit Test plain text name');

    // Open the site settings list page.
    $this->drupalGet('admin/content/site-settings');

    // Click edit link.
    $this->clickLink('Edit', 1);
    $this->assertText('Edit Test multiple entries and fields name 1');
    $this->assertSession()->pageTextContains('Edit Test multiple entries and fields name 1');

    $this->drupalLogout();

@@ -123,21 +123,21 @@ class SiteSettingTypePermissionsUiTest extends BrowserTestBase {
    $this->drupalGet('admin/content/site-settings');

    // Make sure the test plain text is not expected.
    $this->assertNoText('Test plain text');
    $this->assertSession()->pageTextNotContains('Test plain text');

    // Make sure the test multiple entries and fields contents are as expected.
    $this->assertText('Test multiple entries and fields');
    $this->assertSession()->pageTextContains('Test multiple entries and fields');

    // Click add link.
    $this->clickLink('Create setting', 0);

    // Make sure the test multiple entries and fields create page is as
    // expected.
    $this->assertText('Test multiple entries and fields');
    $this->assertSession()->pageTextContains('Test multiple entries and fields');

    // Open the site settings list page.
    $this->drupalGet('admin/structure/site_setting_entity/add/test_plain_text');
    $this->assertText('Access denied');
    $this->assertSession()->pageTextContains('Access denied');

    $this->drupalLogout();

@@ -159,22 +159,23 @@ class SiteSettingTypePermissionsUiTest extends BrowserTestBase {
    $this->drupalGet('admin/content/site-settings');

    // Make sure the test plain text is expected.
    $this->assertText('Test plain text');
    $this->assertSession()->pageTextContains('Test plain text');

    // Make sure the test multiple entries and fields contents are as expected.
    $this->assertText('Test multiple entries and fields');
    $this->assertSession()->pageTextContains('Test multiple entries and fields');

    // Click delete link.
    $this->clickLink('Delete', 0);

    // Make sure the test plain text delete page is visible.
    $this->assertText('This action cannot be undone.');
    $this->assertSession()->pageTextContains('This action cannot be undone.');
    $this->drupalGet($this->getUrl());

    // Click delete link.
    $this->drupalPostForm($this->getUrl(), [], 'Delete');
    $this->submitForm([], 'Delete');

    // Make sure the test plain text is not expected.
    $this->assertNoText('Test plain text value');
    $this->assertSession()->pageTextNotContains('Test plain text value');

    $this->drupalLogout();

@@ -185,7 +186,7 @@ class SiteSettingTypePermissionsUiTest extends BrowserTestBase {
    $this->drupalGet('admin/content/site-settings');

    // Make sure the test plain text is expected.
    $this->assertText('Test plain text');
    $this->assertSession()->pageTextContains('Test plain text');
  }

}
+1 −2
Original line number Diff line number Diff line
name: Site Settings and Labels
type: module
description: Provides a site settings entity for non-admin controlled settings and labels
core: 8.x
core_version_requirement: ^8 || ^9
core_version_requirement: ^8 || ^9 || ^10
configure: site_settings.site_settings_config_form
package: Custom
+1 −1
Original line number Diff line number Diff line
@@ -256,7 +256,7 @@ class SiteSettingReplicateForm extends FormBase {
  private function finalSubmit(array &$form, FormStateInterface $form_state) {

    // Path to the batch processing.
    $path = drupal_get_path('module', 'site_settings');
    $path = \Drupal::service('extension.list.module')->getPath('site_settings');
    $path .= '/src/SiteSettingsReplicateBatches.php';

    // Information to pass to the batch processing.
+1 −1
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ class RenderedSiteSettingsBlock extends BlockBase implements ContainerFactoryPlu
    foreach ($entities as $entity) {

      $pre_render = $view_builder->view($entity, 'default');
      $render_output = render($pre_render);
      $render_output = \Drupal::service('renderer')->render($pre_render);

      $build[] = [
        '#markup' => $render_output,
Loading