Skip to content

Commit

Permalink
[ticket/10414] Skip functional tests on PHP 5.2 - requires PHPUnit 3.…
Browse files Browse the repository at this point in the history
…6 on 5.2

Tests still execute correctly using PHPUnit 3.5 on PHP 5.3 and above. The php
version limitation for a directory was added in PHPUnit 3.6. A separate test
suite is required because the functional tests are in the whitelisted tests
directory. The base test for functional testing is only included in bootstrap
in versions 5.3 and above.

PHPBB3-10414
  • Loading branch information
naderman committed Oct 17, 2011
1 parent 2d42dbc commit 9c861a0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
4 changes: 4 additions & 0 deletions phpunit.xml.all
Expand Up @@ -14,6 +14,10 @@
<testsuites>
<testsuite name="phpBB Test Suite">
<directory suffix="_test.php">./tests/</directory>
<exclude>./tests/functional</exclude>
</testsuite>
<testsuite name="phpBB Functional Tests">
<directory suffix="_test.php" phpVersion="5.3.0" phpVersionOperator=">=">./tests/functional</directory>
</testsuite>
</testsuites>

Expand Down
4 changes: 4 additions & 0 deletions phpunit.xml.dist
Expand Up @@ -14,6 +14,10 @@
<testsuites>
<testsuite name="phpBB Test Suite">
<directory suffix="_test.php">./tests/</directory>
<exclude>./tests/functional</exclude>
</testsuite>
<testsuite name="phpBB Functional Tests">
<directory suffix="_test.php" phpVersion="5.3.0" phpVersionOperator=">=">./tests/functional</directory>
</testsuite>
</testsuites>

Expand Down
4 changes: 4 additions & 0 deletions phpunit.xml.functional
Expand Up @@ -14,6 +14,10 @@
<testsuites>
<testsuite name="phpBB Test Suite">
<directory suffix="_test.php">./tests/</directory>
<exclude>./tests/functional</exclude>
</testsuite>
<testsuite name="phpBB Functional Tests">
<directory suffix="_test.php" phpVersion="5.3.0" phpVersionOperator=">=">./tests/functional</directory>
</testsuite>
</testsuites>

Expand Down
6 changes: 5 additions & 1 deletion tests/bootstrap.php
Expand Up @@ -39,4 +39,8 @@
require_once 'test_framework/phpbb_test_case.php';
require_once 'test_framework/phpbb_database_test_case.php';
require_once 'test_framework/phpbb_database_test_connection_manager.php';
require_once 'test_framework/phpbb_functional_test_case.php';

if (version_compare(PHP_VERSION, '5.3.0-dev', '>='))
{
require_once 'test_framework/phpbb_functional_test_case.php';
}

0 comments on commit 9c861a0

Please sign in to comment.