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
***Next Chapter: [GettingStarted >](/docs/02-GettingStarted)**<p> </p><divclass="alert alert-warning">Docs are incomplete? Outdated? Or you just found a typo? <ahref="https://github.com/Codeception/Codeception/tree/2.0/docs">Help us to improve documentation. Edit it on GitHub</a>
Before we execute this test, we should make sure that the site is running on a local web server. Let's open the `tests/acceptance.suite.yml` file and replace the URL with the URL of your web application:
68
68
69
69
{% highlight yaml %}
70
-
yaml
70
+
71
71
config:
72
72
PhpBrowser:
73
73
url: 'http://myappurl.local'
@@ -76,16 +76,16 @@ config:
76
76
77
77
After we configured URL we can run this test with `run` command:
***Previous Chapter: [< Introduction](/docs/01-Introduction)**<p> </p><divclass="alert alert-warning">Docs are incomplete? Outdated? Or you just found a typo? <ahref="https://github.com/Codeception/Codeception/tree/2.0/docs">Help us to improve documentation. Edit it on GitHub</a>
Copy file name to clipboardExpand all lines: docs/03-ModulesAndHelpers.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ Modules are attached to Actor classes in the suite config.
30
30
For example, in `tests/functional.suite.yml` we should see.
31
31
32
32
{% highlight yaml %}
33
-
yaml
33
+
34
34
class_name: FunctionalTester
35
35
modules:
36
36
enabled: [PhpBrowser, Db, Filesystem]
@@ -44,7 +44,7 @@ The FunctionalTester class has its methods defined in modules. Actually, it does
44
44
Codeception has many bundled modules which will help you run tests for different purposes and in different environments. The number of modules is not constant -- it's supposed to grow as more frameworks and ORMs are supported.
45
45
See all of them listed in the main menu under Modules section.
46
46
47
-
All of these modules are documented. You can review their detailed references on [GitHub](https://github.com/DavertMik/Codeception/tree/master/docs/modules).
47
+
All of these modules are documented. You can review their detailed references on [GitHub](https://github.com/Codeception/Codeception/tree/master/docs/modules).
48
48
49
49
## Helpers
50
50
@@ -138,7 +138,7 @@ Just type `$this->assert` to see all of them.
138
138
139
139
What happens if you have two modules which contain the same named actions?
140
140
Codeception allows you to override actions by changing the module order.
141
-
The action from the second module will be loaded and the action from the first will be ignored.
141
+
The action from the second module will be loaded and the action from the first one will be ignored.
142
142
The order of the modules can be defined in the suite config.
143
143
144
144
### Connecting Modules
@@ -198,7 +198,7 @@ All hooks are defined in `\Codeception\Module` and are listed here. You are free
198
198
public function _initialize() {
199
199
}
200
200
201
-
// HOOK: on every Guy class initialization
201
+
// HOOK: on every Actor class initialization
202
202
public function _cleanup() {
203
203
}
204
204
@@ -214,7 +214,7 @@ All hooks are defined in `\Codeception\Module` and are listed here. You are free
214
214
public function _beforeStep(\Codeception\Step $step) {
215
215
}
216
216
217
-
// HOOK: after each step
217
+
// HOOK: after each step
218
218
public function _afterStep(\Codeception\Step $step) {
219
219
}
220
220
@@ -258,8 +258,8 @@ Here is an example of how it works for PhpBrowser:
258
258
259
259
This test, running with PhpBrowser module in debug mode, will print something like this:
260
260
261
-
{% highlight yaml %}
262
-
bash
261
+
{% highlight bash %}
262
+
263
263
I click "All pages"
264
264
* Request (GET) http://localhost/pages {}
265
265
* Response code: 200
@@ -300,7 +300,7 @@ class WebDriver extends \Codeception\Module
300
300
The host and port parameter can be redefined in the suite config. Values are set in the `modules:config` section of the configuration file.
301
301
302
302
{% highlight yaml %}
303
-
yaml
303
+
304
304
modules:
305
305
enabled:
306
306
- WebDriver
@@ -315,7 +315,7 @@ modules:
315
315
316
316
{% endhighlight %}
317
317
318
-
Optional and mandatory parameters can be accessed through the `$config` property. Use `$this->config['parameter']` to get it's value.
318
+
Optional and mandatory parameters can be accessed through the `$config` property. Use `$this->config['parameter']` to get its value.
319
319
320
320
### Dynamic Configuration
321
321
@@ -390,7 +390,7 @@ class SecondDbHelper extends Db {
390
390
391
391
{% endhighlight %}
392
392
393
-
`$includeInheritedActions` set to false won't include the methods from parent classes into the generated Guy.
393
+
`$includeInheritedActions` set to false won't include the methods from parent classes into the generated Actor.
394
394
Still you can use inherited methods in your helper class.
395
395
396
396
## Conclusion
@@ -399,10 +399,10 @@ Modules are the true power of Codeception. They are used to emulate multiple inh
399
399
Codeception provides modules to emulate web requests, access data, interact with popular PHP libraries, etc.
400
400
For your application you might need custom actions. These can be defined in helper classes.
401
401
If you have written a module that may be useful to others, share it.
402
-
Fork the Codeception repository, put the module into the __src/Codeception/Module__ directory, and send a pull request
402
+
Fork the Codeception repository, put the module into the __src/Codeception/Module__ directory, and send a pull request.
***Previous Chapter: [< GettingStarted](/docs/02-GettingStarted)**<p> </p><divclass="alert alert-warning">Docs are incomplete? Outdated? Or you just found a typo? <ahref="https://github.com/Codeception/Codeception/tree/2.0/docs">Help us to improve documentation. Edit it on GitHub</a>
0 commit comments