aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lint_test.php
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-12-04 16:42:58 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2012-12-04 16:42:58 -0500
commit8897efe087195ba31920c6b3aadbe8ea1b393c12 (patch)
tree27c50f9a9decaf0632e9d2444c0b84c4cf0db263 /tests/lint_test.php
parent4133fae99ec4146a01c67f6a6b3020020d1c6464 (diff)
downloadforums-8897efe087195ba31920c6b3aadbe8ea1b393c12.tar
forums-8897efe087195ba31920c6b3aadbe8ea1b393c12.tar.gz
forums-8897efe087195ba31920c6b3aadbe8ea1b393c12.tar.bz2
forums-8897efe087195ba31920c6b3aadbe8ea1b393c12.tar.xz
forums-8897efe087195ba31920c6b3aadbe8ea1b393c12.zip
[ticket/10716] Exclude our dependencies from linting.
PHPBB3-10716
Diffstat (limited to 'tests/lint_test.php')
-rw-r--r--tests/lint_test.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/lint_test.php b/tests/lint_test.php
index 1642b571dd..67b7413cb4 100644
--- a/tests/lint_test.php
+++ b/tests/lint_test.php
@@ -9,6 +9,17 @@
class phpbb_lint_test extends phpbb_test_case
{
+ static protected $exclude;
+
+ static public function setUpBeforeClass()
+ {
+ self::$exclude = array(
+ // 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',
+ );
+ }
+
public function test_lint()
{
if (version_compare(PHP_VERSION, '5.3.0', '<'))
@@ -35,7 +46,7 @@ class phpbb_lint_test extends phpbb_test_case
{
continue;
}
- if (is_dir($path))
+ if (is_dir($path) && !in_array($path, self::$exclude))
{
$this->check($path);
}