From 522ebb1d7c0ba5812ea04c148b38f43df4ee3fac Mon Sep 17 00:00:00 2001
From: Oliver Davies <oliver@oliverdavies.dev>
Date: Sat, 10 Aug 2024 12:03:04 +0100
Subject: [PATCH] Use MySQL for running tests as the version of

...sqlite is too old for Drupal 11

> The database server version 3.34.1 is less than the minimum required
version 3.45.
---
 phpunit.xml | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 phpunit.xml

diff --git a/phpunit.xml b/phpunit.xml
new file mode 100644
index 0000000..dff535b
--- /dev/null
+++ b/phpunit.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<phpunit
+  beStrictAboutChangesToGlobalState="true"
+  beStrictAboutOutputDuringTests="false"
+  beStrictAboutTestsThatDoNotTestAnything="true"
+  bootstrap="web/core/tests/bootstrap.php"
+  cacheResult="false"
+  colors="true"
+  failOnWarning="true"
+  printerClass="\Drupal\Tests\Listeners\HtmlOutputPrinter"
+>
+  <php>
+    <env name="BROWSERTEST_OUTPUT_BASE_URL" value=""/>
+    <env name="BROWSERTEST_OUTPUT_DIRECTORY" value=""/>
+    <env name="MINK_DRIVER_ARGS" value=''/>
+    <env name="MINK_DRIVER_ARGS_WEBDRIVER" value=''/>
+    <env name="MINK_DRIVER_CLASS" value=''/>
+    <env name="SIMPLETEST_BASE_URL" value="http://web"/>
+    <env name="SIMPLETEST_DB" value="mysql://app:app@database/app#test"/>
+
+    <ini name="error_reporting" value="32767"/>
+    <ini name="memory_limit" value="-1"/>
+  </php>
+
+  <testsuites>
+    <testsuite name="functional">
+      <directory>./web/modules/custom/**/tests/**/Functional</directory>
+    </testsuite>
+    <testsuite name="kernel">
+      <directory>./web/modules/custom/**/tests/**/Kernel</directory>
+    </testsuite>
+    <testsuite name="unit">
+      <directory>./web/modules/custom/**/tests/**/Unit</directory>
+    </testsuite>
+  </testsuites>
+</phpunit>