Skip to content

Commit 257fcd3

Browse files
committed
Replace Laravel5 module with Laravel module
1 parent 56bfc38 commit 257fcd3

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

for/laravel.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ sidebar: |
1515
1616
## Reference
1717
18-
* [Laravel5 Module](/docs/modules/Laravel5)
19-
* [Demo Application](https://github.com/janhenkgerritsen/codeception-laravel5-sample)
18+
* [Laravel Module](/docs/modules/Laravel)
19+
* [Demo Application](https://github.com/Codeception/laravel-module-tests)
2020
2121
---
2222

@@ -46,13 +46,13 @@ cp .env .env.testing
4646

4747
Functional tests allow test application by simulating user actions, this is done by sending requests to framework kernel and checking HTML as a result. Unilke internal tests of Laravel, Codeception doesn't limit you to testing only one request per test. You can **test complex interactions involving different actions and controllers**. This way you can easily cover your specifictions with functional tests.
4848

49-
To start you need to configure `tests/functional.suite.yml` to use Laravel5 module:
49+
To start you need to configure `tests/functional.suite.yml` to use Laravel module:
5050

5151
```yaml
5252
class_name: FunctionalTester
5353
modules:
5454
enabled:
55-
- Laravel5:
55+
- Laravel:
5656
environment_file: .env.testing
5757
- \AppBundle\Helper\Functional
5858
```
@@ -63,7 +63,7 @@ modules:
6363
Continue to <a href="http://codeception.com/docs/04-FunctionalTests">Functional Testing Guide &raquo;</a>
6464
</div>
6565
66-
Codeception will also use **Eloquent to cleanup changes to database** by wrapping tests into transaction and rolling it back in the end of a test. This makes tests isolated and fast. Laravel5 module allows to access services from DIC container, user authentication methods, fixture generators, check form validations and more.
66+
Codeception will also use **Eloquent to cleanup changes to database** by wrapping tests into transaction and rolling it back in the end of a test. This makes tests isolated and fast. Laravel module allows to access services from DIC container, user authentication methods, fixture generators, check form validations and more.
6767
6868
To create first functional test for `Login` you should run:
6969

@@ -79,7 +79,7 @@ Codeception is powered by PHPUnit so unit and integration test work in a similar
7979
php vendor/bin/codecept g:test unit "Foo\Bar"
8080
```
8181
This generates `Codeception\Test\Unit` testcase which is inherited from PHPUnit but provides a module access.
82-
Enable Laravel5 module in `unit.suite.yml` to have its methods inside a testcase. They are available injected into `$this->tester` property of a testcase.
82+
Enable Laravel module in `unit.suite.yml` to have its methods inside a testcase. They are available injected into `$this->tester` property of a testcase.
8383
8484
<div class="alert alert-warning">
8585
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
@@ -105,7 +105,7 @@ Browser can be specified as `firefox`, `chrome`, or others.
105105

106106
Acceptance tests will be executed in development environment using real web server, so settings from `.env.testing` can't be passed to them.
107107

108-
You can also use Eloquent to create data for acceptance tests. This way you can use data factories and models to prepare and cleanup data for tests. You should enable Laravel5 module with ORM part to add ActiveRecord methods:
108+
You can also use Eloquent to create data for acceptance tests. This way you can use data factories and models to prepare and cleanup data for tests. You should enable Laravel module with ORM part to add ActiveRecord methods:
109109

110110
```yaml
111111
class_name: AcceptanceTester
@@ -114,13 +114,13 @@ modules:
114114
- WebDriver:
115115
url: 'https://localhost/' # put your local url
116116
browser: firefox
117-
- Laravel5:
117+
- Laravel:
118118
part: ORM
119119
cleanup: false # can't wrap into transaction
120120
- \Helper\Acceptance
121121
```
122122
123-
Laravel5 module won't be able to wrap test execution in a transaction but methods like `haveRecord` or `haveModel` will delete objects they created when test ends.
123+
Laravel module won't be able to wrap test execution in a transaction but methods like `haveRecord` or `haveModel` will delete objects they created when test ends.
124124

125125
### API Tests
126126

@@ -130,23 +130,23 @@ API Tests are done at functional testing level but instead of testing HTML respo
130130
php vendor/bin/codecept g:suite api
131131
```
132132
133-
You will need to enable `REST`, `Laravel5` module in `tests/api.suite.yml`:
133+
You will need to enable `REST`, `Laravel` module in `tests/api.suite.yml`:
134134
135135
```yaml
136136
class_name: ApiTester
137137
modules:
138138
enabled:
139139
- REST:
140140
url: /api/v1
141-
depends: Laravel5
141+
depends: Laravel
142142
- \Helper\Api
143143
config:
144-
- Laravel5:
144+
- Laravel:
145145
environment_file: .env.testing
146146
147147
```
148148

149-
Laravel5 module actions like `amOnPage` or `see` should not be available for testing API. This why Laravel5 module is not enabled but declared with `depends` for REST module. Laravel5 should use testing environment which is specified in `config` section
149+
Laravel module actions like `amOnPage` or `see` should not be available for testing API. This why Laravel module is not enabled but declared with `depends` for REST module. Laravel should use testing environment which is specified in `config` section
150150

151151

152152
<div class="alert alert-warning">

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy