Skip to content

Commit 41908b0

Browse files
authored
Merge pull request #643 from ThomasLandauer/patch-3
Minor updates
2 parents b5d8d91 + 6c58f78 commit 41908b0

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

guides/01-Introduction.md

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

1919
| | Unit Tests | Functional Tests | Acceptance Tests
2020
| --- | --- | --- | --- |
21-
| 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)) |
21+
| 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)) |
2222
| Testing computer needs access to project's PHP files | Yes | Yes | No |
2323
| Webserver required | No | No | Yes |
2424
| JavaScript | No | No | Yes |
25-
| Additional software required | None | None | Selenium for browser testing |
26-
| Speed | Fast | Fast | Slow |
27-
| Configuration file | `unit.suite.yml` | `functional.suite.yml` | `acceptance.suite.yml` |
25+
| Additional software required | None | None | Drivers for Firefox/Chrome |
26+
| Test execution speed | Very fast | Fast | Slow |
27+
| Configuration file | `Unit.suite.yml` | `Functional.suite.yml` | `Acceptance.suite.yml` |
2828

2929
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!
3030
And chances are, that you will (sooner or later) need all three. That's why Codeception consists of three so-called "suites":
31-
A "unit suite" for all unit tests, a "functional suite" for all functional tests, and an "acceptance suite" for all acceptance tests.
31+
A "Unit suite" for all unit tests, a "functional suite" for all functional tests, and an "Acceptance suite" for all acceptance tests.
3232

33-
Let's review those three testing types in reverse order.
33+
Let's review those three test types in reverse order.
3434

3535
### Acceptance Tests
3636

@@ -57,11 +57,11 @@ $I->see('Thank you for Signing Up!');
5757
### Functional Tests
5858

5959
What if you could check our application without running it on a server?
60-
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.
60+
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.
6161

6262
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.
6363

64-
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.
64+
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.
6565

6666
#### Sample functional test
6767

@@ -70,11 +70,11 @@ $I->amOnPage('/');
7070
$I->click('Sign Up');
7171
$I->submitForm('#signup', ['username' => 'MilesDavis', 'email' => 'miles@davis.com']);
7272
$I->see('Thank you for Signing Up!');
73-
$I->seeEmailSent('miles@davis.com', 'Thank you for registration');
73+
$I->seeEmailIsSent('miles@davis.com', 'Thank you for your registration');
7474
$I->seeInDatabase('users', ['email' => 'miles@davis.com']);
7575
```
7676

77-
> This looks very similar to acceptance tests. The behavior is the same, however, the test is executed inside PHP without launching a browser.
77+
> This looks very similar to acceptance tests. The behavior is the same, however, the test is executed inside PHP without launching a real browser.
7878
7979
### Unit Tests
8080

0 commit comments

Comments
 (0)