Enhance-PHP/Enhance-PHP — Issue #1: discoverTests should ignore hidden files by default
Author: lkraider
Created: 2011-10-28 19:57:20+00:00
State: open

This is an issue specially on Mac which has .DS_Store files all over the place, and the discoverTests include causes binary data to be output on the test results.

```diff
diff --git a/external/EnhanceTestFramework.php b/external/EnhanceTestFramework.php
index 2ebcbb4..45486a5 100755
--- a/external/EnhanceTestFramework.php
+++ b/external/EnhanceTestFramework.php
@@ -393,7 +393,7 @@ class EnhanceFileSystem
$files = array();
if ($handle = opendir($directory)) {
while (false !== ($file = readdir($handle))) {
- if ($file != '.' && $file != '..') {
+ if ($file != '.' && $file != '..' && strpos($file, '.') != 0) {
if ($this->isFolderExcluded($file, $excludeRules)){
continue;
}
```