You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/README.md
+24-8Lines changed: 24 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,11 +12,15 @@ writing we are running version 9.x. Support for this has been built into the
12
12
**composer.json** file that ships with CodeIgniter and can easily be installed
13
13
via [Composer](https://getcomposer.org/) if you don't already have it installed globally.
14
14
15
-
> composer install
15
+
```console
16
+
> composer install
17
+
```
16
18
17
19
If running under OS X or Linux, you can create a symbolic link to make running tests a touch nicer.
18
20
19
-
> ln -s ./vendor/bin/phpunit ./phpunit
21
+
```console
22
+
> ln -s ./vendor/bin/phpunit ./phpunit
23
+
```
20
24
21
25
You also need to install [XDebug](https://xdebug.org/docs/install) in order
22
26
for code coverage to be calculated successfully. After installing `XDebug`, you must add `xdebug.mode=coverage` in the **php.ini** file to enable code coverage.
@@ -38,31 +42,43 @@ the tests run quite a bit faster.
38
42
39
43
The entire test suite can be run by simply typing one command-line command from the main directory.
40
44
41
-
> ./phpunit
45
+
```console
46
+
> ./phpunit
47
+
```
42
48
43
49
If you are using Windows, use the following command.
44
50
45
-
> vendor\bin\phpunit
51
+
```console
52
+
> vendor\bin\phpunit
53
+
```
46
54
47
55
You can limit tests to those within a single test directory by specifying the
48
56
directory name after phpunit. All core tests are stored under **tests/system**.
49
57
50
-
> ./phpunit tests/system/HTTP/
58
+
```console
59
+
> ./phpunit tests/system/HTTP/
60
+
```
51
61
52
62
Individual tests can be run by including the relative path to the test file.
53
63
54
-
> ./phpunit tests/system/HTTP/RequestTest.php
64
+
```console
65
+
> ./phpunit tests/system/HTTP/RequestTest.php
66
+
```
55
67
56
68
You can run the tests without running the live database and the live cache tests.
0 commit comments