diff --git a/code_coverage.patch b/code_coverage.patch index bf3d2df..fbb47d5 100644 --- a/code_coverage.patch +++ b/code_coverage.patch @@ -1,14 +1,5 @@ -From 73381c4f7f5816ad8654b64330da82c66654d022 Mon Sep 17 00:00:00 2001 -From: Jimmy Berry -Date: Wed, 27 Jul 2011 00:31:03 -0500 -Subject: Patch against Drupal core to enable code_coverage support. - ---- - includes/bootstrap.inc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc -index 6034311..10f89fc 100644 +index c828037..68db826 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -5,6 +5,8 @@ @@ -20,6 +11,24 @@ index 6034311..10f89fc 100644 /** * The current system version. */ --- -1.7.6 - +diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php +index 9095e22..586c0db 100644 +--- a/modules/simpletest/drupal_web_test_case.php ++++ b/modules/simpletest/drupal_web_test_case.php +@@ -494,6 +494,8 @@ abstract class DrupalTestCase { + ); + $completion_check_id = DrupalTestCase::insertAssert($this->testId, $class, FALSE, t('The test did not complete due to a fatal error.'), 'Completion check', $caller); + $this->setUp(); ++ // Start Xdebug code coverage ++ xdebug_start_code_coverage(XDEBUG_CC_DEAD_CODE | XDEBUG_CC_UNUSED); + if ($this->setup) { + try { + $this->$method(); +@@ -503,6 +505,7 @@ abstract class DrupalTestCase { + $this->exceptionHandler($e); + } + $this->tearDown(); ++ code_coverage_record($this->testId, FALSE); + } + else { + $this->fail(t("The test cannot be executed because it has not been set up properly."));