Skip to content

Commit 2f56017

Browse files
github-actions[bot]github-actions[bot]
authored andcommitted
updated
1 parent 41908b0 commit 2f56017

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

docs/01-Introduction.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ Out of the box you have tools for writing unit, functional, and acceptance tests
2424

2525
| | Unit Tests | Functional Tests | Acceptance Tests
2626
| --- | --- | --- | --- |
27-
| Scope of the test | Single PHP class | PHP Framework (Routing, Controllers, etc.) | Page in browser (Chrome, Firefox, or [PhpBrowser](https://codeception.com/docs/03-AcceptanceTests#PhpBrowser)) |
27+
| Scope of the test | Single PHP class | PHP Framework (Routing, Database, etc.) | Page in browser (Chrome, Firefox, or [PhpBrowser](https://codeception.com/docs/03-AcceptanceTests#PhpBrowser)) |
2828
| Testing computer needs access to project's PHP files | Yes | Yes | No |
2929
| Webserver required | No | No | Yes |
3030
| JavaScript | No | No | Yes |
31-
| Additional software required | None | None | Selenium for browser testing |
32-
| Speed | Fast | Fast | Slow |
33-
| Configuration file | `unit.suite.yml` | `functional.suite.yml` | `acceptance.suite.yml` |
31+
| Additional software required | None | None | Drivers for Firefox/Chrome |
32+
| Test execution speed | Very fast | Fast | Slow |
33+
| Configuration file | `Unit.suite.yml` | `Functional.suite.yml` | `Acceptance.suite.yml` |
3434

3535
One of the main advantages of Codeception is that you don't have to decide on just *one* type of testing. You should have all three!
3636
And chances are, that you will (sooner or later) need all three. That's why Codeception consists of three so-called "suites":
37-
A "unit suite" for all unit tests, a "functional suite" for all functional tests, and an "acceptance suite" for all acceptance tests.
37+
A "Unit suite" for all unit tests, a "functional suite" for all functional tests, and an "Acceptance suite" for all acceptance tests.
3838

39-
Let's review those three testing types in reverse order.
39+
Let's review those three test types in reverse order.
4040

4141
### Acceptance Tests
4242

@@ -63,11 +63,11 @@ $I->see('Thank you for Signing Up!');
6363
### Functional Tests
6464

6565
What if you could check our application without running it on a server?
66-
That way you could see detailed exceptions on errors, have our tests run faster, and check the database against predictable and expected results. That's what functional tests are for.
66+
That way you could see detailed exceptions on errors, have your tests run faster, and check the database against predictable and expected results. That's what functional tests are for.
6767

6868
For functional tests, you emulate a web request (`$_GET` and `$_POST` variables) which returns the HTML response. Inside a test, you can make assertions about the response, and you can check if the data was successfully stored in the database.
6969

70-
For functional tests, your application needs to be structured in order to run in a test environment. Codeception provides connectors to all popular PHP frameworks.
70+
For functional tests, your application needs to be structured in order to run in a test environment. Codeception provides modules for all popular PHP frameworks.
7171

7272
#### Sample functional test
7373

@@ -76,11 +76,11 @@ $I->amOnPage('/');
7676
$I->click('Sign Up');
7777
$I->submitForm('#signup', ['username' => 'MilesDavis', 'email' => 'miles@davis.com']);
7878
$I->see('Thank you for Signing Up!');
79-
$I->seeEmailSent('miles@davis.com', 'Thank you for registration');
79+
$I->seeEmailIsSent('miles@davis.com', 'Thank you for your registration');
8080
$I->seeInDatabase('users', ['email' => 'miles@davis.com']);
8181
```
8282

83-
> This looks very similar to acceptance tests. The behavior is the same, however, the test is executed inside PHP without launching a browser.
83+
> This looks very similar to acceptance tests. The behavior is the same, however, the test is executed inside PHP without launching a real browser.
8484
8585
### Unit Tests
8686

docs/Introduction.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ Out of the box you have tools for writing unit, functional, and acceptance tests
2424

2525
| | Unit Tests | Functional Tests | Acceptance Tests
2626
| --- | --- | --- | --- |
27-
| Scope of the test | Single PHP class | PHP Framework (Routing, Controllers, etc.) | Page in browser (Chrome, Firefox, or [PhpBrowser](https://codeception.com/docs/03-AcceptanceTests#PhpBrowser)) |
27+
| Scope of the test | Single PHP class | PHP Framework (Routing, Database, etc.) | Page in browser (Chrome, Firefox, or [PhpBrowser](https://codeception.com/docs/03-AcceptanceTests#PhpBrowser)) |
2828
| Testing computer needs access to project's PHP files | Yes | Yes | No |
2929
| Webserver required | No | No | Yes |
3030
| JavaScript | No | No | Yes |
31-
| Additional software required | None | None | Selenium for browser testing |
32-
| Speed | Fast | Fast | Slow |
33-
| Configuration file | `unit.suite.yml` | `functional.suite.yml` | `acceptance.suite.yml` |
31+
| Additional software required | None | None | Drivers for Firefox/Chrome |
32+
| Test execution speed | Very fast | Fast | Slow |
33+
| Configuration file | `Unit.suite.yml` | `Functional.suite.yml` | `Acceptance.suite.yml` |
3434

3535
One of the main advantages of Codeception is that you don't have to decide on just *one* type of testing. You should have all three!
3636
And chances are, that you will (sooner or later) need all three. That's why Codeception consists of three so-called "suites":
37-
A "unit suite" for all unit tests, a "functional suite" for all functional tests, and an "acceptance suite" for all acceptance tests.
37+
A "Unit suite" for all unit tests, a "functional suite" for all functional tests, and an "Acceptance suite" for all acceptance tests.
3838

39-
Let's review those three testing types in reverse order.
39+
Let's review those three test types in reverse order.
4040

4141
### Acceptance Tests
4242

@@ -63,11 +63,11 @@ $I->see('Thank you for Signing Up!');
6363
### Functional Tests
6464

6565
What if you could check our application without running it on a server?
66-
That way you could see detailed exceptions on errors, have our tests run faster, and check the database against predictable and expected results. That's what functional tests are for.
66+
That way you could see detailed exceptions on errors, have your tests run faster, and check the database against predictable and expected results. That's what functional tests are for.
6767

6868
For functional tests, you emulate a web request (`$_GET` and `$_POST` variables) which returns the HTML response. Inside a test, you can make assertions about the response, and you can check if the data was successfully stored in the database.
6969

70-
For functional tests, your application needs to be structured in order to run in a test environment. Codeception provides connectors to all popular PHP frameworks.
70+
For functional tests, your application needs to be structured in order to run in a test environment. Codeception provides modules for all popular PHP frameworks.
7171

7272
#### Sample functional test
7373

@@ -76,11 +76,11 @@ $I->amOnPage('/');
7676
$I->click('Sign Up');
7777
$I->submitForm('#signup', ['username' => 'MilesDavis', 'email' => 'miles@davis.com']);
7878
$I->see('Thank you for Signing Up!');
79-
$I->seeEmailSent('miles@davis.com', 'Thank you for registration');
79+
$I->seeEmailIsSent('miles@davis.com', 'Thank you for your registration');
8080
$I->seeInDatabase('users', ['email' => 'miles@davis.com']);
8181
```
8282

83-
> This looks very similar to acceptance tests. The behavior is the same, however, the test is executed inside PHP without launching a browser.
83+
> This looks very similar to acceptance tests. The behavior is the same, however, the test is executed inside PHP without launching a real browser.
8484
8585
### Unit Tests
8686

0 commit comments

Comments
 (0)