Skip to content
This repository was archived by the owner on May 18, 2024. It is now read-only.

Commit 9533ad8

Browse files
committed
Bugfix SUPPORTPATH, add docs on paths
1 parent 9e14085 commit 9533ad8

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,23 @@ composer.lock
5353
Examples of **composer.json** and **.gitignore** are located in the [examples/](examples/)
5454
folder if you need a starting point.
5555

56+
### Paths
57+
58+
A number of framework and testing path are defined as constants during the
59+
[bootstrap process](src/tests/_support/bootstrap.php). These default to the assumed locations
60+
if you have a standard directory structure. If you move directories around you will need to
61+
review these paths and set them appropriately.
62+
63+
* **APPPATH**: `$paths->appDirectory`
64+
* **ROOTPATH**: `APPPATH . '../'`
65+
* **FCPATH**: `ROOTPATH . 'public/'`
66+
* **WRITEPATH**: `$paths->writableDirectory`
67+
* **SYSTEMPATH**: `$paths->systemDirectory`
68+
* **CIPATH**: `SYSTEMPATH . '../`
69+
* **SUPPORTPATH**: `CIPATH . 'tests/_support/`
70+
* **PROJECTSUPPORTPATH**: *bootstrap.php directory*
71+
* **TESTPATH**: `PROJECTSUPPORTPATH . '../`
72+
5673
## Updating
5774

5875
As this repo is updated with bugfixes and improvements you will want to update your

src/tests/_support/bootstrap.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
define('APPPATH', realpath($paths->appDirectory) . DIRECTORY_SEPARATOR);
1818
define('ROOTPATH', realpath(APPPATH . '../') . DIRECTORY_SEPARATOR);
1919
define('FCPATH', realpath(ROOTPATH . 'public') . DIRECTORY_SEPARATOR);
20-
define('SYSTEMPATH', realpath($paths->systemDirectory) . DIRECTORY_SEPARATOR);
2120
define('WRITEPATH', realpath($paths->writableDirectory) . DIRECTORY_SEPARATOR);
22-
define('SUPPORTPATH', realpath(ROOTPATH . 'tests/_support') . DIRECTORY_SEPARATOR);
21+
define('SYSTEMPATH', realpath($paths->systemDirectory) . DIRECTORY_SEPARATOR);
22+
define('CIPATH', realpath(SYSTEMPATH . '../') . DIRECTORY_SEPARATOR);
23+
define('SUPPORTPATH', realpath(CIPATH . 'tests/_support') . DIRECTORY_SEPARATOR);
2324

2425
// Define necessary module test path constants
2526
define('MODULESUPPORTPATH', realpath(__DIR__) . DIRECTORY_SEPARATOR);

0 commit comments

Comments
 (0)