Adding a code coverage test file
authorRobert Sesek <rsesek@bluestatic.org>
Mon, 11 Dec 2006 01:06:13 +0000 (01:06 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Mon, 11 Dec 2006 01:06:13 +0000 (01:06 +0000)
UnitTest/Coverage.php [new file with mode: 0644]

diff --git a/UnitTest/Coverage.php b/UnitTest/Coverage.php
new file mode 100644 (file)
index 0000000..873173a
--- /dev/null
@@ -0,0 +1,45 @@
+<?php
+/*=====================================================================*
+|| ###################################################################
+|| # Bugdar [#]version[#]
+|| # Copyright ©2002-[#]year[#] Blue Static
+|| #
+|| # This program is free software; you can redistribute it and/or modify
+|| # it under the terms of the GNU General Public License as published by
+|| # the Free Software Foundation; version [#]gpl[#] of the License.
+|| #
+|| # This program is distributed in the hope that it will be useful, but
+|| # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+|| # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+|| # more details.
+|| #
+|| # You should have received a copy of the GNU General Public License along
+|| # with this program; if not, write to the Free Software Foundation, Inc.,
+|| # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+|| ###################################################################
+\*=====================================================================*/
+
+require_once('/Server/lib/php/Spike/src/CoverageRecorder.php');
+require_once('/Server/lib/php/Spike/src/reporter/HtmlCoverageReporter.php');
+
+$reporter = new HtmlCoverageReporter('Code Coverage Report', null, 'coverage');
+
+$include = array('..');
+$exclude = array('../docs/', '../UnitTest/', '../images/');
+
+$coverage = new CoverageRecorder($include, $exclude, $reporter);
+
+$coverage->startInstrumentation();
+require_once('AllTests.php');
+$coverage->stopInstrumentation();
+
+$coverage->generateReport();
+$reporter->printTextSummary();
+
+/*=====================================================================*
+|| ###################################################################
+|| # $HeadURL$
+|| # $Id$
+|| ###################################################################
+\*=====================================================================*/
+?>
\ No newline at end of file