]> Raphaël G. Git Repositories - airlibre/commitdiff
Add test bootstrap php file
authorRaphaël Gertz <git@rapsys.eu>
Tue, 27 Feb 2024 10:23:59 +0000 (11:23 +0100)
committerRaphaël Gertz <git@rapsys.eu>
Tue, 27 Feb 2024 10:23:59 +0000 (11:23 +0100)
tests/bootstrap.php [new file with mode: 0644]

diff --git a/tests/bootstrap.php b/tests/bootstrap.php
new file mode 100644 (file)
index 0000000..469dcce
--- /dev/null
@@ -0,0 +1,11 @@
+<?php
+
+use Symfony\Component\Dotenv\Dotenv;
+
+require dirname(__DIR__).'/vendor/autoload.php';
+
+if (file_exists(dirname(__DIR__).'/config/bootstrap.php')) {
+    require dirname(__DIR__).'/config/bootstrap.php';
+} elseif (method_exists(Dotenv::class, 'bootEnv')) {
+    (new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
+}