Skip to content

Commit 767e7ca

Browse files
committed
Update test files for phpBB4 skeletons
1 parent 2117cbd commit 767e7ca

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

skeleton/phpunit.xml.dist.twig

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,12 @@
4747
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4848
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
4949
backupGlobals="true"
50-
backupStaticAttributes="false"
5150
colors="true"
52-
convertErrorsToExceptions="true"
53-
convertNoticesToExceptions="true"
54-
convertWarningsToExceptions="true"
5551
processIsolation="false"
5652
stopOnFailure="false"
5753
cacheResult="false"
5854
bootstrap="../../../../tests/bootstrap.php"
59-
>
60-
<coverage>
61-
<include>
62-
<directory suffix=".php">./</directory>
63-
</include>
64-
<exclude>
65-
<directory suffix=".php">./language/</directory>
66-
<directory suffix=".php">./migrations/</directory>
67-
<directory suffix=".php">./tests/</directory>
68-
</exclude>
69-
</coverage>
55+
backupStaticProperties="false">
7056
<testsuites>
7157
<testsuite name="Extension Test Suite">
7258
<directory suffix="_test.php">./tests</directory>
@@ -76,5 +62,17 @@
7662
<directory suffix="_test.php">./tests/functional/</directory>
7763
</testsuite>
7864
</testsuites>
65+
<source restrictDeprecations="true"
66+
restrictNotices="true"
67+
restrictWarnings="true">
68+
<include>
69+
<directory suffix=".php">./</directory>
70+
</include>
71+
<exclude>
72+
<directory suffix=".php">./language/</directory>
73+
<directory suffix=".php">./migrations/</directory>
74+
<directory suffix=".php">./tests/</directory>
75+
</exclude>
76+
</source>
7977
</phpunit>
8078
{% endif %}

skeleton/tests/dbal/simple_test.php.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class simple_test extends \phpbb_database_test_case
5252
{
5353
// This is how to instantiate db_tools in phpBB 3.2
5454
$factory = new \phpbb\db\tools\factory();
55-
$db_tools = $factory->get($this->db);
55+
$db_tools = $factory->get({% if skeleton_version_compare(REQUIREMENTS.phpbb_version_min, "4.0", "<") %}$this->db{% else %}$this->new_doctrine_dbal(){% endif %});
5656
}
5757
5858
$this->assertTrue($db_tools->sql_column_exists(USERS_TABLE, 'user_{{ EXTENSION.extension_name|lower }}'), 'Asserting that column "user_{{ EXTENSION.extension_name|lower }}" exists');

0 commit comments

Comments
 (0)