Permalink
Browse files

MINOR: exclude thirdparty and diagnose method from coverage

  • Loading branch information...
1 parent 67d19a9 commit 87ceec3d63be5b5d6aae5a1bd67622f9c56042ce @mrmorphic mrmorphic committed Oct 17, 2010
Showing with 7 additions and 2 deletions.
  1. +3 −1 _config.php
  2. +4 −1 code/Sphinx.php
View
@@ -3,4 +3,6 @@
Director::addRules(100, array(
'sphinxxmlsource' => 'SphinxXMLPipeController'));
-?>
+// Exclude the sphinx API from coverage
+TestRunner::$coverage_filter_dirs[] = "sphinx/thirdparty";
+
View
@@ -685,6 +685,8 @@ function getIndexesForClass($className) {
* @todo Format output nicely for both http and command line.
* @return void
*/
+ // This method is ignored in code coverage reports, as it's really a maintenance function, and very dependent on external configuration.
+ // @codeCoverageIgnoreStart
function diagnose() {
$errors = array();
$warnings = array();
@@ -729,7 +731,7 @@ function diagnose() {
// $this->PIDFile = self::$pid_file ? self::$pid_file : $this->VARPath . '/searchd.pid';
// Check if the sphinx binaries are present on the host
- $notices[] = "Sphinx binary locations: " . implode( ', ', array_values( $this->BINPath ) );
+ $notices[] = "Sphinx binary locations: " . implode( ', ', array_values( $this->BINPath ) );
foreach ( $this->stat('binaries') as $file ) {
if ( !$this->BINPath[$file] ) {
$errors[] = array(
@@ -821,6 +823,7 @@ function diagnose() {
echo $this->format("listend");
}
}
+ // @codeCoverageIgnoreEnd
private $listDepth = 0;

0 comments on commit 87ceec3

Please sign in to comment.