forked from codeigniter4/CodeIgniter4
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_bootstrap.php
More file actions
32 lines (24 loc) · 1.03 KB
/
Copy path_bootstrap.php
File metadata and controls
32 lines (24 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
ini_set('error_reporting', E_ALL);
;
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
// Make sure it recognizes that we're testing.
$_SERVER['CI_ENVIRONMENT'] = 'testing';
define('ENVIRONMENT', 'testing');
// Load our paths config file
require __DIR__ . '/../../app/Config/Paths.php';
// path to the directory that holds the front controller (index.php)
define('FCPATH', realpath(__DIR__ . '/../../') . '/public' . DIRECTORY_SEPARATOR);
// The path to the "tests" directory
define('TESTPATH', realpath(__DIR__ . '/../') . DIRECTORY_SEPARATOR);
define('SUPPORTPATH', realpath(TESTPATH . '_support/') . DIRECTORY_SEPARATOR);
// Set environment values that would otherwise stop the framework from functioning during tests.
if (! isset($_SERVER['app.baseURL']))
{
$_SERVER['app.baseURL'] = 'http://example.com';
}
//--------------------------------------------------------------------
// Load our TestCase
//--------------------------------------------------------------------
require __DIR__ . '/CIUnitTestCase.php';