@todo: BrowserTestBase::prepareRequestForGenerator use symfony Request

Created on 1 April 2016, almost 9 years ago
Updated 8 February 2023, about 2 years ago

Problem/Motivation

Follow-up to #2232861: Create BrowserTestBase for web-testing on top of Mink

BrowserTestBase::prepareRequestForGenerator says the following:

  protected function prepareRequestForGenerator($clean_urls = TRUE, $override_server_vars = array()) {
    $request = Request::createFromGlobals();
    $server = $request->server->all();
    if (basename($server['SCRIPT_FILENAME']) != basename($server['SCRIPT_NAME'])) {
      // We need this for when the test is executed by run-tests.sh.
      // @todo Remove this once run-tests.sh has been converted to use a Request
      //   object.
      $cwd = getcwd();
      $server['SCRIPT_FILENAME'] = $cwd . '/' . basename($server['SCRIPT_NAME']);
      $base_path = rtrim($server['REQUEST_URI'], '/');
    }
    else {
      $base_path = $request->getBasePath();
    }

run-tests.sh currently uses Request and has its own special kernel anyway, so it's time to do this.

Proposed resolution

Work on the @todo.

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

10.1

Component
PHPUnit 

Last updated about 8 hours ago

Created by

🇺🇸United States mile23 Seattle, WA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024