summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-06-20 09:36:56 -0700
committerBharat Mediratta <bharat@menalto.com>2010-06-20 09:36:56 -0700
commitec052d71301acbf519947897f8adda7fdcf7fefb (patch)
tree359d4e9a9eec14ec3b471356d608fd7b9864c08b /modules
parent9f9d3866e86d4b50fc1315c7db2687a5f0b8ce8d (diff)
Assert how many files we analyze so that we can tell if we're suddenly
analzying too many or too few.
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery/tests/File_Structure_Test.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/gallery/tests/File_Structure_Test.php b/modules/gallery/tests/File_Structure_Test.php
index 1c3356d9..96e0b758 100644
--- a/modules/gallery/tests/File_Structure_Test.php
+++ b/modules/gallery/tests/File_Structure_Test.php
@@ -23,13 +23,18 @@ class File_Structure_Test extends Gallery_Unit_Test_Case {
public function no_trailing_closing_php_tag_test() {
$dir = new GalleryCodeFilterIterator(
new RecursiveIteratorIterator(new RecursiveDirectoryIterator(DOCROOT)));
+ $count = 0;
foreach ($dir as $file) {
+ $count++;
if (!preg_match("|\.html\.php$|", $file->getPathname())) {
$this->assert_false(
preg_match('/\?\>\s*$/', file_get_contents($file)),
"{$file->getPathname()} ends in ?>");
}
}
+
+ $this->assert_true($count > 500, "We should have analyzed at least this 500 files");
+ $this->assert_true($count < 1000, "We shouldn't be shipping 1000 files!");
}
public function view_files_correct_suffix_test() {