@@ 32-42 (lines=11) @@ | ||
29 | $file = static::TEST_FOLDER . '/Bootstrap.php'; |
|
30 | $contents = file_get_contents($file); |
|
31 | ||
32 | if (! file_exists('system')) { |
|
33 | if (file_exists('vendor/codeigniter/framework/system')) { |
|
34 | $contents = str_replace( |
|
35 | '$system_path = \'../../system\';', |
|
36 | '$system_path = \'../../vendor/codeigniter/framework/system\';', |
|
37 | $contents |
|
38 | ); |
|
39 | } else { |
|
40 | throw new Exception('Can\'t find "system" folder.'); |
|
41 | } |
|
42 | } |
|
43 | ||
44 | if (! file_exists('index.php')) { |
|
45 | if (file_exists('public/index.php')) { |
|
@@ 44-54 (lines=11) @@ | ||
41 | } |
|
42 | } |
|
43 | ||
44 | if (! file_exists('index.php')) { |
|
45 | if (file_exists('public/index.php')) { |
|
46 | $contents = str_replace( |
|
47 | "define('FCPATH', realpath(dirname(__FILE__).'/../..').'/');", |
|
48 | "define('FCPATH', realpath(dirname(__FILE__).'/../../public').'/');", |
|
49 | $contents |
|
50 | ); |
|
51 | } else { |
|
52 | throw new Exception('Can\'t find "index.php".'); |
|
53 | } |
|
54 | } |
|
55 | ||
56 | file_put_contents($file, $contents); |
|
57 | } |