Skip to content

Commit d199123

Browse files
committed
docs: update command style
1 parent 17b5c3f commit d199123

3 files changed

Lines changed: 57 additions & 18 deletions

File tree

admin/module/tests/README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,15 @@ writing we are running version 8.5.13. Support for this has been built into the
1616
**composer.json** file that ships with CodeIgniter and can easily be installed
1717
via [Composer](https://getcomposer.org/) if you don't already have it installed globally.
1818

19-
> composer install
19+
```console
20+
> composer install
21+
```
2022

2123
If running under OS X or Linux, you can create a symbolic link to make running tests a touch nicer.
2224

23-
> ln -s ./vendor/bin/phpunit ./phpunit
25+
```console
26+
> ln -s ./vendor/bin/phpunit ./phpunit
27+
```
2428

2529
You also need to install [XDebug](https://xdebug.org/index.php) in order
2630
for code coverage to be calculated successfully.
@@ -37,19 +41,26 @@ on your machine. More details on a test database setup are in the
3741

3842
The entire test suite can be run by simply typing one command-line command from the main directory.
3943

40-
> ./phpunit
44+
```console
45+
> ./phpunit
46+
```
4147

4248
You can limit tests to those within a single test directory by specifying the
4349
directory name after phpunit.
4450

45-
> ./phpunit app/Models
51+
```console
52+
> ./phpunit app/Models
53+
```
4654

4755
## Generating Code Coverage
4856

4957
To generate coverage information, including HTML reports you can view in your browser,
5058
you can use the following command:
5159

5260
> ./phpunit --colors --coverage-text=tests/coverage.txt --coverage-html=tests/coverage/ -d memory_limit=1024m
61+
```console
62+
> ./phpunit --colors --coverage-text=tests/coverage.txt --coverage-html=tests/coverage/ -d memory_limit=1024m
63+
```
5364

5465
This runs all of the tests again collecting information about how many lines,
5566
functions, and files are tested. It also reports the percentage of the code that is covered by tests.

admin/starter/tests/README.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,15 @@ writing we are running version 9.x. Support for this has been built into the
1717
**composer.json** file that ships with CodeIgniter and can easily be installed
1818
via [Composer](https://getcomposer.org/) if you don't already have it installed globally.
1919

20-
> composer install
20+
```console
21+
> composer install
22+
```
2123

2224
If running under OS X or Linux, you can create a symbolic link to make running tests a touch nicer.
2325

24-
> ln -s ./vendor/bin/phpunit ./phpunit
26+
```console
27+
> ln -s ./vendor/bin/phpunit ./phpunit
28+
```
2529

2630
You also need to install [XDebug](https://xdebug.org/index.php) in order
2731
for code coverage to be calculated successfully.
@@ -43,23 +47,31 @@ the tests run quite a bit faster.
4347

4448
The entire test suite can be run by simply typing one command-line command from the main directory.
4549

46-
> ./phpunit
50+
```console
51+
> ./phpunit
52+
```
4753

4854
If you are using Windows, use the following command.
4955

50-
> vendor\bin\phpunit
56+
```console
57+
> vendor\bin\phpunit
58+
```
5159

5260
You can limit tests to those within a single test directory by specifying the
5361
directory name after phpunit.
5462

55-
> ./phpunit app/Models
63+
```console
64+
> ./phpunit app/Models
65+
```
5666

5767
## Generating Code Coverage
5868

5969
To generate coverage information, including HTML reports you can view in your browser,
6070
you can use the following command:
6171

62-
> ./phpunit --colors --coverage-text=tests/coverage.txt --coverage-html=tests/coverage/ -d memory_limit=1024m
72+
```console
73+
> ./phpunit --colors --coverage-text=tests/coverage.txt --coverage-html=tests/coverage/ -d memory_limit=1024m
74+
```
6375

6476
This runs all of the tests again collecting information about how many lines,
6577
functions, and files are tested. It also reports the percentage of the code that is covered by tests.

tests/README.md

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ writing we are running version 9.x. Support for this has been built into the
1212
**composer.json** file that ships with CodeIgniter and can easily be installed
1313
via [Composer](https://getcomposer.org/) if you don't already have it installed globally.
1414

15-
> composer install
15+
```console
16+
> composer install
17+
```
1618

1719
If running under OS X or Linux, you can create a symbolic link to make running tests a touch nicer.
1820

19-
> ln -s ./vendor/bin/phpunit ./phpunit
21+
```console
22+
> ln -s ./vendor/bin/phpunit ./phpunit
23+
```
2024

2125
You also need to install [XDebug](https://xdebug.org/docs/install) in order
2226
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.
3842

3943
The entire test suite can be run by simply typing one command-line command from the main directory.
4044

41-
> ./phpunit
45+
```console
46+
> ./phpunit
47+
```
4248

4349
If you are using Windows, use the following command.
4450

45-
> vendor\bin\phpunit
51+
```console
52+
> vendor\bin\phpunit
53+
```
4654

4755
You can limit tests to those within a single test directory by specifying the
4856
directory name after phpunit. All core tests are stored under **tests/system**.
4957

50-
> ./phpunit tests/system/HTTP/
58+
```console
59+
> ./phpunit tests/system/HTTP/
60+
```
5161

5262
Individual tests can be run by including the relative path to the test file.
5363

54-
> ./phpunit tests/system/HTTP/RequestTest.php
64+
```console
65+
> ./phpunit tests/system/HTTP/RequestTest.php
66+
```
5567

5668
You can run the tests without running the live database and the live cache tests.
5769

58-
> ./phpunit --exclude-group DatabaseLive,CacheLive
70+
```console
71+
> ./phpunit --exclude-group DatabaseLive,CacheLive
72+
```
5973

6074
## Generating Code Coverage
6175

6276
To generate coverage information, including HTML reports you can view in your browser,
6377
you can use the following command:
6478

65-
> ./phpunit --colors --coverage-text=tests/coverage.txt --coverage-html=tests/coverage/ -d memory_limit=1024m
79+
```console
80+
> ./phpunit --colors --coverage-text=tests/coverage.txt --coverage-html=tests/coverage/ -d memory_limit=1024m
81+
```
6682

6783
This runs all of the tests again collecting information about how many lines,
6884
functions, and files are tested. It also reports the percentage of the code that is covered by tests.

0 commit comments

Comments
 (0)