Skip to content

Commit 3ffedff

Browse files
authored
Merge pull request #2345 from dafriend/tests_readme_polish
Tests readme polish
2 parents baaefe7 + 11a53f3 commit 3ffedff

1 file changed

Lines changed: 25 additions & 25 deletions

File tree

tests/README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Running System Tests
22

33
This is the quick-start to CodeIgniter testing. Its intent is to describe what
4-
it takes to get your system setup and ready to run the system tests.
4+
it takes to set up your system and get it ready to run unit tests.
55
It is not intended to be a full description of the test features that you can
6-
use to test your application, since that can be found in the documentation.
6+
use to test your application. Those details can be found in the documentation.
77

88
## Requirements
99

1010
It is recommended to use the latest version of PHPUnit. At the time of this
1111
writing we are running version 7.5.1. Support for this has been built into the
12-
**composer.json** file that ships with CodeIgniter, and can easily be installed
12+
**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

1515
> composer install
@@ -19,24 +19,24 @@ If running under OS X or Linux, you can create a symbolic link to make running t
1919
> ln -s ./vendor/bin/phpunit ./phpunit
2020

2121
You also need to install [XDebug](https://xdebug.org/index.php) in order
22-
for the unit tests to successfully complete.
22+
for unit tests to successfully complete.
2323

24-
## Setup
24+
## Setting Up
2525

26-
A number of the tests that are ran during the test suite are ran against a running database.
27-
In order to setup the database used here, edit the details for the `tests` database
28-
group in **app/Config/Database.php**. Make sure that you provide a database engine
29-
that is currently running, and have already created a table that you can use only
30-
for these tests, as it will be wiped and refreshed often while running the test suite.
26+
A number of the tests use a running database.
27+
In order to set up the database edit the details for the `tests` group in
28+
**app/Config/Database.php**. Make sure that you provide a database engine
29+
that is currently running on your machine. More details on a test database setup are in the
30+
*Docs>>Testing>>Testing Your Database* section of the documentation.
3131

32-
If you want to run the tests without running the live database tests,
33-
you can exclude @DatabaseLive group. Or make a copy of **phpunit.dist.xml**,
34-
call it **phpunit.xml**, and un-comment the line within the testsuite that excludes
32+
If you want to run the tests without using live database you can
33+
exclude @DatabaseLive group. Or make a copy of **phpunit.dist.xml** -
34+
call it **phpunit.xml** - and uncomment the line within the <testsuite> that excludes
3535
the **tests/system/Database/Live** directory. This will make the tests run quite a bit faster.
3636

3737
## Running the tests
3838

39-
The entire test suite can be ran by simply typing one command from the command line within the main directory.
39+
The entire test suite can be run by simply typing one command-line command from the main directory.
4040

4141
> ./phpunit
4242

@@ -45,7 +45,7 @@ directory name after phpunit. All core tests are stored under **tests/system**.
4545

4646
> ./phpunit tests/system/HTTP/
4747

48-
Individual tests can be ran by including the relative path to the test file.
48+
Individual tests can be run by including the relative path to the test file.
4949

5050
> ./phpunit tests/system/HTTP/RequestTest
5151

@@ -60,22 +60,22 @@ you can use the following command:
6060

6161
> ./phpunit --colors --coverage-text=tests/coverage.txt --coverage-html=tests/coverage/ -d memory_limit=1024m
6262

63-
This runs all of the tests again, collecting information about how many lines,
64-
functions, and files are tested, and the percent of the code that is covered by the tests.
65-
It is collected in two formats: a simple text file that provides an overview,
66-
as well as comprehensive collection of HTML files that show the status of every line of code in the project.
63+
This runs all of the tests again collecting information about how many lines,
64+
functions, and files are tested. It also reports the percentage of the code that is covered by tests.
65+
It is collected in two formats: a simple text file that provides an overview as well
66+
as a comprehensive collection of HTML files that show the status of every line of code in the project.
6767

6868
The text file can be found at **tests/coverage.txt**.
6969
The HTML files can be viewed by opening **tests/coverage/index.html** in your favorite browser.
7070

7171
## PHPUnit XML Configuration
7272

73-
The repository has a ``phpunit.xml.dist`` file in the project root, used for
74-
PHPUnit configuration. This is used as a default configuration if you
75-
do not have your own ``phpunit.xml`` in the project root.
73+
The repository has a ``phpunit.xml.dist`` file in the project root that's used for
74+
PHPUnit configuration. This is used to provide a default configuration if you
75+
do not have your own configuration file in the project root.
7676

7777
The normal practice would be to copy ``phpunit.xml.dist`` to ``phpunit.xml``
78-
(which is git ignored), and to tailor yours as you see fit.
79-
For instance, you might wish to exclude database tests
80-
or automatically generate HTML code coverage reports.
78+
(which is git ignored), and to tailor it as you see fit.
79+
For instance, you might wish to exclude database tests, or automatically generate
80+
HTML code coverage reports.
8181

0 commit comments

Comments
 (0)