protected function UncaughtExceptionTest::drupalGet in Drupal 8
Retrieves a Drupal path or an absolute path.
Executes a cURL request for processing errors and exceptions.
Parameters
string|\Drupal\Core\Url $path: Request path.
array $extra_options: (optional) Curl options to pass to curl_setopt()
array $headers: (optional) Not used.
Overrides UiHelperTrait::drupalGet
9 calls to UncaughtExceptionTest::drupalGet()
- UncaughtExceptionTest::testErrorContainer in core/
tests/ Drupal/ FunctionalTests/ Bootstrap/ UncaughtExceptionTest.php - Tests a container which has an error.
- UncaughtExceptionTest::testExceptionContainer in core/
tests/ Drupal/ FunctionalTests/ Bootstrap/ UncaughtExceptionTest.php - Tests a container which has an exception really early.
- UncaughtExceptionTest::testLoggerException in core/
tests/ Drupal/ FunctionalTests/ Bootstrap/ UncaughtExceptionTest.php - Tests fallback to PHP error log when an exception is thrown while logging.
- UncaughtExceptionTest::testLostDatabaseConnection in core/
tests/ Drupal/ FunctionalTests/ Bootstrap/ UncaughtExceptionTest.php - Tests the case when the database connection is gone.
- UncaughtExceptionTest::testMissingDependency in core/
tests/ Drupal/ FunctionalTests/ Bootstrap/ UncaughtExceptionTest.php - Tests a missing dependency on a service.
File
- core/
tests/ Drupal/ FunctionalTests/ Bootstrap/ UncaughtExceptionTest.php, line 350
Class
- UncaughtExceptionTest
- Tests kernel panic when things are really messed up.
Namespace
Drupal\FunctionalTests\BootstrapCode
protected function drupalGet($path, array $extra_options = [], array $headers = []) {
$url = $this
->buildUrl($path, [
'absolute' => TRUE,
]);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_USERAGENT, drupal_generate_test_ua($this->databasePrefix));
$this->response = curl_exec($ch);
$this->info = curl_getinfo($ch);
curl_close($ch);
}