function UpdateCoreTest::testServiceUnavailable

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

File

core/modules/update/tests/src/Functional/UpdateCoreTest.php, line 767

Class

UpdateCoreTest
Tests the Update Manager module through a series of functional tests using mock XML data.

Namespace

Drupal\Tests\update\Functional

Code

public function testServiceUnavailable() {
    $this->refreshUpdateStatus([], '503-error');
    // Ensure that no "Warning: SimpleXMLElement..." parse errors are found.
    $this->assertNoText('SimpleXMLElement');
    $this->assertUniqueText(t('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.