Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663

This commit is contained in:
Greg Anderson 2015-10-08 11:40:12 -07:00
parent eb34d130a8
commit f32e58e4b1
8476 changed files with 211648 additions and 170042 deletions

View file

@ -5,6 +5,7 @@
* This script runs Drupal tests from command line.
*/
use Drupal\Component\Utility\Html;
use Drupal\Component\Utility\Timer;
use Drupal\Component\Uuid\Php;
use Drupal\Core\Database\Database;
@ -203,6 +204,9 @@ All arguments are long options.
if you want to also view any pages rendered in the simpletest
browser you need to add --verbose to the command line.
--non-html Removes escaping from output. Useful for reading results on the
CLI.
<test1>[,<test2>[,<test3> ...]]
One or more tests to be run. By default, these are interpreted
@ -267,6 +271,7 @@ function simpletest_script_parse_args() {
'test-id' => 0,
'execute-test' => '',
'xml' => '',
'non-html' => FALSE,
);
// Override with set values.
@ -584,6 +589,12 @@ function simpletest_script_execute_batch($test_classes) {
* Run a group of phpunit tests.
*/
function simpletest_script_run_phpunit($test_id, $class) {
$reflection = new \ReflectionClass($class);
if ($reflection->hasProperty('runLimit')) {
set_time_limit($reflection->getStaticPropertyValue('runLimit'));
}
$results = simpletest_run_phpunit_tests($test_id, array($class));
simpletest_process_phpunit_results($results);
@ -1101,14 +1112,18 @@ function simpletest_script_reporter_display_results() {
* @param $result The result object to format.
*/
function simpletest_script_format_result($result) {
global $results_map, $color;
global $args, $results_map, $color;
$summary = sprintf("%-9.9s %-10.10s %-17.17s %4.4s %-35.35s\n",
$results_map[$result->status], $result->message_group, basename($result->file), $result->line, $result->function);
simpletest_script_print($summary, simpletest_script_color_code($result->status));
$lines = explode("\n", wordwrap(trim(strip_tags($result->message)), 76));
$message = trim(strip_tags($result->message));
if ($args['non-html']) {
$message = Html::decodeEntities($message, ENT_QUOTES, 'UTF-8');
}
$lines = explode("\n", wordwrap($message), 76);
foreach ($lines as $line) {
echo " $line\n";
}
@ -1262,7 +1277,7 @@ function simpletest_script_open_browser() {
// Make the html page to write to disk.
$render_service = \Drupal::service('renderer');
$html = '<head>' . ($js_assets_header) . $render_service->renderPlain($css_assets) . '</head><body>' . $render_service->renderPlain($form) . $render_service->renderPlain($js_assets_footer) .'</body>';
$html = '<head>' . $render_service->renderPlain($js_assets_header) . $render_service->renderPlain($css_assets) . '</head><body>' . $render_service->renderPlain($form) . $render_service->renderPlain($js_assets_footer) .'</body>';
// Ensure we have assets verbose directory - tests with no verbose output will not
// have created one.