aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2023-12-28 19:09:13 +0100
committerHarald Eilertsen <haraldei@anduin.net>2023-12-28 19:09:13 +0100
commit7f6cf4f06bcd17277086eac0a866542fc121a4ae (patch)
tree0d91428c6659627551db734d3a1ea28d3b2ffe76
parent5b1771c8075e984f5c617881125a8f54fd4f08c3 (diff)
downloadvolse-hubzilla-tests/test-db-setup-wip.tar.gz
volse-hubzilla-tests/test-db-setup-wip.tar.bz2
volse-hubzilla-tests/test-db-setup-wip.zip
tests: Set db charset from test config.tests/test-db-setup-wip
MySql and PostgreSQL does of course have different names for charsets, so we have to explicitly define them in the respective phpunit.xml files. This also allows testing with other charsets if there should be a need for that, though I think utf8 should cover everything and then some.
-rw-r--r--tests/phpunit-ci-mysql.xml6
-rw-r--r--tests/phpunit.xml8
2 files changed, 11 insertions, 3 deletions
diff --git a/tests/phpunit-ci-mysql.xml b/tests/phpunit-ci-mysql.xml
index 8a1cf20ec..f4d024c39 100644
--- a/tests/phpunit-ci-mysql.xml
+++ b/tests/phpunit-ci-mysql.xml
@@ -14,6 +14,7 @@
<env name="HZ_TEST_DB_USER" value="root"/>
<env name="HZ_TEST_DB_PASS" value="mysql"/>
<env name="HZ_TEST_DB_DATABASE" value="hello_world_test"/>
+ <env name="HZ_TEST_DB_CHARSET" value="utf8mb4"/>
</php>
<testsuites>
<testsuite name="Hubzilla default Test Suite">
@@ -23,7 +24,10 @@
<directory suffix="Test.php" prefix="API">./unit/</directory>
</testsuite>
</testsuites>
- <coverage processUncoveredFiles="true">
+ <coverage
+ processUncoveredFiles="true"
+ cacheDirectory=".cache/phpunit"
+ >
<include>
<directory suffix=".php">../Zotlabs/</directory>
<directory suffix=".php">../include/</directory>
diff --git a/tests/phpunit.xml b/tests/phpunit.xml
index 24cd09749..6be3bc173 100644
--- a/tests/phpunit.xml
+++ b/tests/phpunit.xml
@@ -13,7 +13,8 @@
<env name="HZ_TEST_DB_PORT" value=""/>
<env name="HZ_TEST_DB_USER" value="test_user"/>
<env name="HZ_TEST_DB_PASS" value="hubzilla"/>
- <env name="HZ_TEST_DB_DATAbase" value="hubzilla_test_db"/>
+ <env name="HZ_TEST_DB_DATABASE" value="hubzilla_test_db"/>
+ <env name="HZ_TEST_DB_CHARSET" value="UTF8"/>
</php>
<testsuites>
<testsuite name="Hubzilla default Test Suite">
@@ -23,7 +24,10 @@
<directory suffix="Test.php" prefix="API">./unit/</directory>
</testsuite>
</testsuites>
- <coverage processUncoveredFiles="true">
+ <coverage
+ processUncoveredFiles="true"
+ cacheDirectory=".cache/phpunit"
+ >
<include>
<directory suffix=".php">../Zotlabs/</directory>
<directory suffix=".php">../include/</directory>