mirror of
https://github.com/JGH0/Todo-App-Backend.git
synced 2026-06-03 13:28:47 +02:00
added API documentation and testing
This commit is contained in:
19
tests/bootstrap.php
Normal file
19
tests/bootstrap.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Test Bootstrap
|
||||
*
|
||||
* Sets up the testing environment before the framework boots.
|
||||
* Disables the debug toolbar that would wrap JSON API responses in HTML.
|
||||
* The framework's own Test/bootstrap.php handles ENVIRONMENT constant.
|
||||
*/
|
||||
|
||||
// Disable debug toolbar before the framework defines CI_DEBUG
|
||||
defined('CI_DEBUG') || define('CI_DEBUG', false);
|
||||
|
||||
// Ensure CI_ENVIRONMENT env var is set (framework checks this)
|
||||
putenv('CI_ENVIRONMENT=testing');
|
||||
$_SERVER['CI_ENVIRONMENT'] = 'testing';
|
||||
|
||||
// Load the framework's test bootstrap (defines ENVIRONMENT constant)
|
||||
require __DIR__ . '/../vendor/codeigniter4/framework/system/Test/bootstrap.php';
|
||||
Reference in New Issue
Block a user