You are here

public function UpdateTestBase::visit in Automatic Updates 8.2

Visit a URI on the HTTP server.

The concept here is that there could be multiple potential docroots in the workspace, so you can use whichever ones you want.

Parameters

string $request_uri: (optional) The non-host part of the URL. Example: /some/path?foo=bar. Defaults to visiting the homepage.

string $working_dir: (optional) Relative path within the test workspace file system that will be the docroot for the request. Defaults to the workspace directory.

Return value

\Behat\Mink\Mink The Mink object. Perform assertions against this.

Throws

\InvalidArgumentException Thrown when $request_uri does not start with a slash.

Overrides BuildTestBase::visit

9 calls to UpdateTestBase::visit()
CoreUpdateTest::assertReadOnlyFileSystemError in tests/src/Build/CoreUpdateTest.php
Asserts that the update is prevented if the filesystem isn't writable.
CoreUpdateTest::assertUpdateSuccessful in tests/src/Build/CoreUpdateTest.php
Asserts that Drupal core was successfully updated.
CoreUpdateTest::createTestSite in tests/src/Build/CoreUpdateTest.php
Uses our already-installed dependencies to build a test site to update.
CoreUpdateTest::testCron in tests/src/Build/CoreUpdateTest.php
Tests an end-to-end core update via cron.
CoreUpdateTest::testUi in tests/src/Build/CoreUpdateTest.php
Tests an end-to-end core update via the UI.

... See full list

File

tests/src/Build/UpdateTestBase.php, line 114

Class

UpdateTestBase
Base class for tests that perform in-place updates.

Namespace

Drupal\Tests\automatic_updates\Build

Code

public function visit($request_uri = '/', $working_dir = NULL) {
  return parent::visit($request_uri, $working_dir ?: $this->webRoot);
}