com php-src: Docs for find_tested.php: scripts/dev/find _tested.php
| From: | Christoph Michael Becker | Date: | Tue, 04 Aug 2015 21:46:47 +0000 |
| Subject: | com php-src: Docs for find_tested.php: scripts/dev/find _tested.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-88521@lists.php.net to get a copy of this message | ||
Commit: 1e4742d5cd23f8766be0e1ecd6414628f71060ce
Author: Nikhil Vimal <techvoltz@gmail.com> Tue, 4 Aug 2015 16:46:47 -0500
Parents: 668ecaa606b3203311b3329fcbd49b59f715e1e4
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1e4742d5cd23f8766be0e1ecd6414628f71060ce
Log:
Docs for find_tested.php
Initial Pass, also fixing the extra space before the extract_tests function name to keep with
standards.
Changed paths:
M scripts/dev/find_tested.php
Diff:
diff --git a/scripts/dev/find_tested.php b/scripts/dev/find_tested.php
index e841e2e..0881e9e 100644
--- a/scripts/dev/find_tested.php
+++ b/scripts/dev/find_tested.php
@@ -68,7 +68,10 @@ get_phpt_files($extension_test_path, $count, $phpt_files);
$extension_method_info = mark_methods_as_tested($extension_method_info, $phpt_files);
-
+/**
+ * The loop to ouput the test coverage info
+ * Should output: Extension, Class Name, Method/Function Name, Test Status, Test Files
+ */
foreach($extension_method_info as $record) {
echo $record[EXTENSION_NAME] . ",";
echo $record[CLASS_NAME] . ",";
@@ -193,11 +196,14 @@ function get_phpt_files($dir, &$phpt_file_count, &$all_phpt)
}
}
-function extract_tests($file) {
+/**
+ * Extract tests from a specified file, returns an array of tested function tokens
+ */
+function extract_tests($file) {
$code = file_get_contents($file);
if (!preg_match('/--FILE--\s*(.*)\s*--(EXPECTF|EXPECTREGEX|EXPECT)?--/is', $code, $r)) {
-// print "Unable to get code in ".$file."\n";
+ //print "Unable to get code in ".$file."\n";
return array();
}