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

Commit 646ca06

Browse files
authored
Merge pull request #6 from MGatner/migrate-group
Fix paths, Specify migration group, Add Docs
2 parents 3d313a4 + 9533ad8 commit 646ca06

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-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/Database/Migrations/2019-09-02-092335_create_test_tables.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
class CreateTestTables extends Migration
66
{
7+
protected $DBGroup = 'tests';
8+
79
public function up()
810
{
911
$fields = [

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)