Verified Commit d37bfd70 authored by Dave Long's avatar Dave Long
Browse files

test: #3571492 Several tests fail on PHP 8.1 on 10.6.x because of requirements issues

By: alexpott
(cherry picked from commit a524d016)
parent 15e3a121
Loading
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -106,7 +106,6 @@ public function testUpdateHooks(): void {
    \Drupal::state()->set('equivalent_update_test_update_100101', FALSE);

    $this->drupalGet($this->updateUrl, ['external' => TRUE]);
    $this->updateRequirementsProblem();
    $this->assertSession()->pageTextContains('The version of the Equivalent Update test module that you are attempting to update to is missing update 100101 (which was marked as an equivalent by 100002). Update to at least Drupal Core 11.1.0.');

    \Drupal::state()->set('equivalent_update_test_update_100101', TRUE);
@@ -158,7 +157,6 @@ public function testUpdateHooks(): void {
    \Drupal::state()->set('equivalent_update_test_update_100400', FALSE);
    \Drupal::state()->set('equivalent_update_test_update_100401', TRUE);
    $this->drupalGet($this->updateUrl, ['external' => TRUE]);
    $this->updateRequirementsProblem();
    $this->assertSession()->pageTextContains('The version of the Equivalent Update test module that you are attempting to update to is missing update 100402 (which was marked as an equivalent by 100400). Update to at least Drupal Core 11.2.0.');

    \Drupal::state()->set('equivalent_update_test_update_100400', TRUE);
@@ -173,7 +171,6 @@ public function testUpdateHooks(): void {
    \Drupal::state()->set('equivalent_update_test_update_100400', FALSE);
    \Drupal::state()->set('equivalent_update_test_update_100401', FALSE);
    $this->drupalGet($this->updateUrl, ['external' => TRUE]);
    $this->updateRequirementsProblem();
    $this->assertSession()->pageTextContains('The version of the Equivalent Update test module that you are attempting to update to is missing update 100402 (which was marked as an equivalent by 100401). Update to at least Drupal Core 11.2.0.');

    \Drupal::state()->set('equivalent_update_test_update_100402', TRUE);
+13 −0
Original line number Diff line number Diff line
@@ -38,6 +38,12 @@ protected function setUp(): void {
      'value' => TRUE,
      'required' => TRUE,
    ];
    // Do not compress css so we can detect claro correctly. See
    // \Drupal\Tests\RequirementsPageTrait::assertRequirementSummaries().
    $this->settings['config']['system.performance']['css']['preprocess'] = (object) [
      'value' => FALSE,
      'required' => TRUE,
    ];

    parent::setUp();
  }
@@ -90,6 +96,13 @@ protected function setUpProfile(): void {
    // Noop. This form is skipped due the parameters set on the URL.
  }

  /**
   * {@inheritdoc}
   */
  protected function setUpRequirementsProblem(): void {
    // Recipe installation is not affected by requirements.
  }

  protected function installDefaultThemeFromClassProperty(ContainerInterface $container): void {
    // In this context a default theme makes no sense.
  }
+8 −0
Original line number Diff line number Diff line
@@ -55,6 +55,14 @@ protected function setUpSite(): void {
    // This form will never be reached.
  }

  /**
   * {@inheritdoc}
   */
  protected function setUpRequirementsProblem(): void {
    // We are testing an update requirements problem, so we need to override the
    // parent method.
  }

  /**
   * Tests the expected requirements problem.
   */
+8 −0
Original line number Diff line number Diff line
@@ -55,6 +55,14 @@ protected function setUpSite(): void {
    // This form will never be reached.
  }

  /**
   * {@inheritdoc}
   */
  protected function setUpRequirementsProblem(): void {
    // We are testing an update requirements problem, so we need to override the
    // parent method.
  }

  /**
   * Tests the expected requirements problem.
   */
+6 −0
Original line number Diff line number Diff line
@@ -19,4 +19,10 @@ class InstallerExistingConfigNoProfileTest extends InstallerExistingConfigTest {
   */
  protected $profile = FALSE;

  /**
   * {@inheritdoc}
   */
  protected function setUpRequirementsProblem(): void {
  }

}