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

Commit 87a92c7

Browse files
authored
Merge pull request #5 from MGatner/paths-update
Bugfix SUPPORTPATH, add docs on paths
2 parents 2a52ae8 + f5878ed commit 87a92c7

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,24 @@ 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 and you installed the framework via Composer.
61+
If you move directories around or do no use Composer you will need to review these paths
62+
and set them appropriately.
63+
64+
* **APPPATH**: `$paths->appDirectory`
65+
* **ROOTPATH**: `APPPATH . '../'`
66+
* **FCPATH**: `ROOTPATH . 'public/'`
67+
* **WRITEPATH**: `$paths->writableDirectory`
68+
* **SYSTEMPATH**: `$paths->systemDirectory`
69+
* **CIPATH**: `SYSTEMPATH . '../`
70+
* **SUPPORTPATH**: `CIPATH . 'tests/_support/`
71+
* **PROJECTSUPPORTPATH**: *bootstrap.php directory*
72+
* **TESTPATH**: `PROJECTSUPPORTPATH . '../`
73+
5674
## Updating
5775

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

src/tests/_support/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
define('WRITEPATH', realpath($paths->writableDirectory) . DIRECTORY_SEPARATOR);
2121
define('SYSTEMPATH', realpath($paths->systemDirectory) . DIRECTORY_SEPARATOR);
2222
define('CIPATH', realpath(SYSTEMPATH . '../') . DIRECTORY_SEPARATOR);
23-
define('SUPPORTPATH', realpath(ROOTPATH . 'tests/_support') . DIRECTORY_SEPARATOR);
23+
define('SUPPORTPATH', realpath(CIPATH . 'tests/_support') . DIRECTORY_SEPARATOR);
2424

2525
// Define necessary project test path constants
2626
define('PROJECTSUPPORTPATH', realpath(__DIR__) . DIRECTORY_SEPARATOR);

0 commit comments

Comments
 (0)