You are here

public function UpdaterFormTest::testFormNotDisplayedIfAlreadyCurrent in Automatic Updates 8.2

Tests that the form doesn't display any buttons if Drupal is up-to-date.

@todo Mark this test as skipped if the web server is PHP's built-in, single threaded server.

@dataProvider providerUpdateFormReferringUrl

Parameters

string $update_form_url: The URL of the update form to visit.

File

tests/src/Functional/UpdaterFormTest.php, line 83

Class

UpdaterFormTest
@covers \Drupal\automatic_updates\Form\UpdaterForm

Namespace

Drupal\Tests\automatic_updates\Functional

Code

public function testFormNotDisplayedIfAlreadyCurrent(string $update_form_url) : void {
  $this
    ->setCoreVersion('9.8.1');
  $this
    ->checkForUpdates();
  $this
    ->drupalGet($update_form_url);
  $assert_session = $this
    ->assertSession();
  $assert_session
    ->statusCodeEquals(200);
  $assert_session
    ->pageTextContains('No update available');
  $assert_session
    ->buttonNotExists('Update');
}