Modified: library/trunk/lib/test/result.class.php (3 => 4)
--- library/trunk/lib/test/result.class.php 2006-08-09 18:55:04 UTC (rev 3)
+++ library/trunk/lib/test/result.class.php 2006-08-09 18:56:49 UTC (rev 4)
@@ -45,6 +45,18 @@
protected $arg;
/**
+ * code coverage information array
+ * @var $coverage array
+ */
+ protected $coverage = array();
+
+ /**
+ * timer profiling info
+ * @var $profile array
+ */
+ protected $profile = array();
+
+ /**
* count the number of test units shown
* @var $units int
*/
@@ -66,7 +78,7 @@
* count the number of tests
* @var $testpass int
*/
- protected $testpass = 0;
+ protected $testspass = 0;
/**
* count the number of tests
@@ -90,7 +102,7 @@
* count the number of tests
* @var $testsimcomplete int
*/
- protected $testsimcomplete = 0;
+ protected $testsincomplete = 0;
/**
* count the number of assertions
@@ -408,6 +420,44 @@
}
//----------------------------------------------------------------
+ // Code Coverage and Profiling
+ //----------------------------------------------------------------
+
+ /**
+ * public function codeCoverage
+ *
+ * pump in code coverage information per test
+ *
+ * @param string $test test name
+ * @param array $coverage xdebug code coverage information
+ * @return void
+ */
+ public function codeCoverage($coverage, $test)
+ {
+ $this->coverage[$test] = $coverage;
+ $this->call = 'codeCoverage';
+ $this->arg = array($coverage, $test);
+ $this->notify();
+ return;
+ }
+
+ /**
+ * public function mark
+ *
+ * adds a timer marker
+ *
+ * @return void
+ */
+ public function mark($name)
+ {
+ $this->profile[$name] = microtime(TRUE);
+ $this->call = 'mark';
+ $this->arg = $name;
+ $this->notify();
+ return;
+ }
+
+ //----------------------------------------------------------------
// All properties are read-only
//----------------------------------------------------------------