function BrowserTestBaseTest::testSimpleTestBaseUrlValidation
Same name in other branches
- 9 core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php \Drupal\FunctionalTests\BrowserTestBaseTest::testSimpleTestBaseUrlValidation()
- 11.x core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php \Drupal\FunctionalTests\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\FunctionalTestsCode
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.