You are here

function simpletest_log_read in Drupal 8

Same name and namespace in other branches
  1. 7 modules/simpletest/simpletest.module \simpletest_log_read()

Reads the error log and reports any errors as assertion failures.

The errors in the log should only be fatal errors since any other errors will have been recorded by the error handler.

Parameters

$test_id: The test ID to which the log relates.

$database_prefix: The database prefix to which the log relates.

$test_class: The test class to which the log relates.

Return value

bool Whether any fatal errors were found.

Deprecated

in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Test\TestDatabase::logRead() instead.

See also

https://www.drupal.org/node/3075252

File

core/modules/simpletest/simpletest.module, line 461
Provides testing functionality.

Code

function simpletest_log_read($test_id, $database_prefix, $test_class) {
  @trigger_error(__FUNCTION__ . ' is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \\Drupal\\Core\\Test\\TestDatabase::logRead() instead. See https://www.drupal.org/node/3075252', E_USER_DEPRECATED);
  $test_db = new TestDatabase($database_prefix);
  return $test_db
    ->logRead($test_id, $test_class);
}