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

Commit 5b0a776

Browse files
authored
Merge pull request #7 from codeigniter4projects/develop
Update for release
2 parents a94aa62 + 13b84be commit 5b0a776

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

README.md

+18
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/phpunit.xml.dist

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717

1818
<filter>
1919
<whitelist addUncoveredFilesFromWhitelist="true" processUncoveredFilesFromWhitelist="true">
20-
<directory suffix=".php">./src</directory>
20+
<directory suffix=".php">./app</directory>
2121
<exclude>
22-
<directory suffix=".php">./src/Views</directory>
23-
<file>./src/Config/Routes.php</file>
22+
<directory suffix=".php">./app/Views</directory>
23+
<file>./app/Config/Routes.php</file>
2424
</exclude>
2525
</whitelist>
2626
</filter>

src/tests/_support/Database/Migrations/2019-09-02-092335_create_test_tables.php

+2
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

+1-1
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)