Hi,

Test website send errors catched with specific HTTP headers to cURL user-agent ("X-Drupal-Assertion-NUMBER").
Unfortunetly, some testing framework like WebDriver doesn't support HTTP headers...

A simple alternative would be to write errors into a file of the testing public file directory.

Here is a patch for example.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chaby’s picture

Status: Active » Needs review
FileSize
1.56 KB

Status: Needs review » Needs work

The last submitted patch, 1: 2368345-test_error_file-1.patch, failed testing.

chaby’s picture

Status: Needs work » Needs review
FileSize
1.56 KB

Indeed, patch could not be applied.
If I run git apply --ignore-space-change 2368345-test_error_file-1.patch, it works...but

  header('X-Drupal-Assertion-' . $number . ': ' . rawurlencode(serialize($assertion)));
  $number++;
}

is not well indented because original source is not well indented.

Running git apply -v 2368345-test_error_file-1.patch output :

Checking patch includes/errors.inc...
error: while searching for:
        'line' => $error['%line'],
      ),
    );
      header('X-Drupal-Assertion-' . $number . ': ' . rawurlencode(serialize($assertion)));
      $number++;
    }

  watchdog('php', '%type: !message in %function (line %line of %file).', $error, $error['severity_level']);


error: patch failed: includes/errors.inc:195
error: includes/errors.inc: patch does not apply

As we could see, this block code is already not indented well...

Here is a reroll of this patch which doesn't make sense because now indentation is really broken. So please apply #1 manually instead.