aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lint_test.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2018-12-23 14:35:58 +0100
committerMarc Alexander <admin@m-a-styles.de>2018-12-23 14:35:58 +0100
commit14f9917db60b88bbf2d4d9923e2a2cee5766bbec (patch)
treef709556457beb4a281da8681f5aed983740dde35 /tests/lint_test.php
parent70a56c208fa5bcdde9337c871b30aaaf7e5602b8 (diff)
downloadforums-14f9917db60b88bbf2d4d9923e2a2cee5766bbec.tar
forums-14f9917db60b88bbf2d4d9923e2a2cee5766bbec.tar.gz
forums-14f9917db60b88bbf2d4d9923e2a2cee5766bbec.tar.bz2
forums-14f9917db60b88bbf2d4d9923e2a2cee5766bbec.tar.xz
forums-14f9917db60b88bbf2d4d9923e2a2cee5766bbec.zip
[ticket/15919] Don't run lint test against node_modules
Also, make sure to correctly handle opendir returning false instead of the stream handle. PHPBB3-15919
Diffstat (limited to 'tests/lint_test.php')
-rw-r--r--tests/lint_test.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/lint_test.php b/tests/lint_test.php
index 70046bdfd2..8ab31f976c 100644
--- a/tests/lint_test.php
+++ b/tests/lint_test.php
@@ -67,6 +67,12 @@ class phpbb_lint_test extends phpbb_test_case
{
$files = array();
$dh = opendir($root);
+
+ if ($dh === false)
+ {
+ return $files;
+ }
+
while (($filename = readdir($dh)) !== false)
{
if ($filename == '.' || $filename == '..')
@@ -89,6 +95,7 @@ class phpbb_lint_test extends phpbb_test_case
// PHP Fatal error: Cannot declare class Container because the name is already in use in /var/www/projects/phpbb3/tests/../phpBB/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php on line 20
// https://gist.github.com/e003913ffd493da63cbc
dirname(__FILE__) . '/../phpBB/vendor',
+ dirname(__FILE__) . '/../node_modules',
)))
{
$files = array_merge($files, $this->check($path));