This repository was archived by the owner on May 18, 2024. It is now read-only.
File tree 2 files changed +12
-5
lines changed
2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ PHPUnit testing scaffold for CodeIgniter 4 modules
5
5
## Overview
6
6
7
7
Not a module itself but a testing scaffold for CodeIgniter 4 modules,
8
- ** module-tests ** makes it easy to setup PHPUnit tests in your modules.
8
+ ** ModuleTests ** makes it easy to setup PHPUnit tests in your modules.
9
9
10
10
To read more on Unit Testing in CodeIgniter 4 visit the
11
11
[ User Guide] ( https://codeigniter4.github.io/userguide/testing/index.html ) .
@@ -74,3 +74,10 @@ in **build/logs/**.
74
74
## Code Coverage
75
75
76
76
See the docs on [ Code Coverage] ( docs/COVERAGE.md ) .
77
+
78
+ ## Project Testing
79
+
80
+ ** ModuleTests** is designed to be added to your modular library which will be included into
81
+ other CodeIgniter 4 projects. If you are looking for a testing scaffold for applications
82
+ built using CodeIgniter 4 as their core framework, check out
83
+ [ Codeigniter4Projects/ProjectTests] ( https://github.com/codeigniter4projects/project-tests ) .
Original file line number Diff line number Diff line change 5
5
6
6
## Overview
7
7
8
- ** ci4-module-tests ** comes preconfigured to handle code coverage in addition to the unit tests.
8
+ ** ModuleTests ** comes preconfigured to handle code coverage in addition to the unit tests.
9
9
You will need to have a code coverage driver installed to use this feature, such as
10
10
[ Xdebug] ( https://xdebug.org ) .
11
11
12
12
## Setup
13
13
14
- ** ci4-module-tests ** assumes your source code is in ** src/** ; if your code is somewhere else
14
+ ** ModuleTests ** assumes your source code is in ** src/** ; if your code is somewhere else
15
15
then you will need to modify the following line in your PHPUnit XML file:
16
16
```
17
17
<directory suffix=".php">./src</directory>
18
18
```
19
19
20
20
## PHPUnit.xml
21
21
22
- ** ci4-module-tests ** includes a ready-to-use PHPUnit template in ** phpunit.xml.dist** .
22
+ ** ModuleTests ** includes a ready-to-use PHPUnit template in ** phpunit.xml.dist** .
23
23
Common practice is to create a local copy of this file as ** phpunit.xml** and add any
24
24
sensitive or environment info (like database connections). Prevent ** phpunit.xml** from
25
25
being tracked in your repo by adding it to ** .gitignore** .
@@ -30,7 +30,7 @@ being tracked in your repo by adding it to **.gitignore**.
30
30
31
31
In addition to the code source mentioned above, PHPUnit can be configured to exclude files
32
32
that are not relevant to testing or would otherwise cause the coverage calculations to fail.
33
- ** ci4-module-tests ** starts with a few files common to CodeIgniter 4 but you may need to add
33
+ ** ModuleTests ** starts with a few files common to CodeIgniter 4 but you may need to add
34
34
your own:
35
35
```
36
36
<exclude>
You can’t perform that action at this time.
0 commit comments