function BrowserTestBaseTest::testSimpleTestBaseUrlValidation

Test if setting an invalid scheme in SIMPLETEST_BASE_URL throws an exception.

File

core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php, line 650

Class

BrowserTestBaseTest
Tests BrowserTestBase functionality.

Namespace

Drupal\FunctionalTests

Code

public function testSimpleTestBaseUrlValidation() : void {
  putenv('SIMPLETEST_BASE_URL=mysql://user:pass@localhost/database');
  $this->expectException(\Exception::class);
  $this->expectExceptionMessage('You must provide valid scheme for the SIMPLETEST_BASE_URL environment variable. Valid schema are: http, https.');
  $this->setupBaseUrl();
}

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