Skip to content

Firefly III: a personal finances manager

Add c3 code coverage.

James Cole8de142cd9add
diff --git a/composer.json b/composer.json
index 354ab71e4e..381501f6b7 100644
--- a/composer.json
+++ b/composer.json
@@ -54,11 +54,14 @@
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
- "php artisan optimize"
+ "php artisan optimize",
+ "Codeception\\c3\\Installer::copyC3ToRoot"
+
],
"post-update-cmd": [
"php artisan clear-compiled",
- "php artisan optimize"
+ "php artisan optimize",
+ "Codeception\\c3\\Installer::copyC3ToRoot"
],
"post-create-project-cmd": [
"php -r \"copy('.env.example', '.env');\"",
diff --git a/public/index.php b/public/index.php
index 05322e9f8b..badb7c6f3a 100644
--- a/public/index.php
+++ b/public/index.php
@@ -20,6 +20,14 @@
require __DIR__.'/../bootstrap/autoload.php';
+/**
+ * Adding c3.php for code coverage during codeception tests
+ * ref: https://github.com/Codeception/c3
+ */
+if (file_exists(__DIR__ . '/../c3.php')) {
+ require __DIR__ . '/../c3.php';
+}
+
/*
|--------------------------------------------------------------------------
| Turn On The Lights