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
From Symfony 4 onwards there will be a top-level `tests` directory, instead of a separate `Tests` directory in each bundle.
35
-
So to save you from reconfiguration in the future, it is recommended to place unit, functional, and acceptance test files
34
+
It is recommended to place unit, functional, and acceptance test files
36
35
into `tests`.
37
36
38
37
### Project Setup
@@ -129,8 +128,8 @@ class_name: FunctionalTester
129
128
modules:
130
129
enabled:
131
130
- Symfony:
132
-
app_path: 'app'
133
-
var_path: 'app'
131
+
app_path: 'src'
132
+
environment: 'test'
134
133
- Doctrine2:
135
134
depends: Symfony
136
135
- \Helper\Functional
@@ -168,8 +167,8 @@ modules:
168
167
- \Helper\Api
169
168
config:
170
169
- Symfony:
171
-
app_path: 'app'
172
-
var_path: 'app'
170
+
app_path: 'src'
171
+
environment: 'test'
173
172
174
173
```
175
174
@@ -192,12 +191,6 @@ php bin/codecept g:suite unit
192
191
193
192
Codeception is powered by PHPUnit so unit and integration test work in a similar manner. To genereate a plain PHPUnit test for `Foo` class, run:
194
193
195
-
```
196
-
php bin/codecept g:phpunit unit Foo
197
-
```
198
-
199
-
This generates a standard test inherited from `PHPUnit_Framework_TestCase`. For integration tests you may use Codeception-enhanced format which allows accessing services DI container, Doctrine, and others. You will need to enable Doctrine2 and Symfony module in `unit.suite.yml` config. Such integration test is extending `Codeception\Test\Unit` class and created by running:
0 commit comments