public function BrowserTestBaseTest::testSimpleTestBaseUrlValidation in Drupal 10
Same name and namespace in other branches
- 9 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 745
Class
- BrowserTestBaseTest
- Tests BrowserTestBase functionality.
Namespace
Drupal\FunctionalTestsCode
public function testSimpleTestBaseUrlValidation() {
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();
}