function UpdateSemverCoreTest::testServiceUnavailable

Same name in other branches
  1. 9 core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php \Drupal\Tests\update\Functional\UpdateSemverCoreTest::testServiceUnavailable()
  2. 10 core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php \Drupal\Tests\update\Functional\UpdateSemverCoreTest::testServiceUnavailable()

Tests the Update Manager module when the update server returns 503 errors.

File

core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php, line 44

Class

UpdateSemverCoreTest
Tests edge cases of the Available Updates report UI.

Namespace

Drupal\Tests\update\Functional

Code

public function testServiceUnavailable() : void {
    $this->refreshUpdateStatus([], '503-error');
    // Ensure that no "Warning: SimpleXMLElement..." parse errors are found.
    $this->assertSession()
        ->pageTextNotContains('SimpleXMLElement');
    $this->assertSession()
        ->pageTextContainsOnce('Failed to get available update data for one project.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.