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
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+59-18
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,8 @@ Then, if it appears that it's a real bug, you may report it using GitHub by foll
16
16
* A clear title to resume the issue
17
17
* A description of the workflow needed to reproduce the bug
18
18
19
-
> _NOTE:_ Don't hesitate giving as much information as you can (OS, PHP version extensions...)
19
+
> [!NOTE]
20
+
> Don't hesitate giving as much information as you can (OS, PHP version extensions...)
20
21
21
22
## Pull Requests
22
23
@@ -153,6 +154,9 @@ Coverage will be available in `coverage/index.html`.
153
154
154
155
#### Behat
155
156
157
+
> [!WARNING]
158
+
> Please **do not add new Behat tests**, use a functional test (for example: [ComputedFieldTest](https://github.com/api-platform/core/blob/04d5cff1b28b494ac2e90257a79ce6c045ba82ae/tests/Functional/Doctrine/ComputedFieldTest.php)).
@@ -165,27 +169,64 @@ To get more details about an error, replace `--format=progress` by `-vvv`. You m
165
169
166
170
docker run -p 27017:27017 mongo:latest
167
171
168
-
Start by adding a fixture, usually using Doctrine entities in `tests/Fixtures/TestBundle/Entity`. Note that we often duplicate the fixture
169
-
in the `tests/Fixtures/TestBundle/Document` directory for MongoDB ODM, if your test doesn't need to be tested with MongoDB use the `@!mongodb` group on the Behat scenario.
170
-
If you need a `Given` step, add it to the doctrine context in `tests/Core/Behat/DoctrineContext.php`, for example:
172
+
## Components tests
171
173
172
-
```
173
-
/**
174
-
* @Given there is a payment
175
-
*/
176
-
public function thereIsAPayment()
177
-
{
178
-
$this->manager->persist(new Payment('123.45'));
179
-
$this->manager->flush();
180
-
}
181
-
```
174
+
> [!NOTE]
175
+
> This requires linking dependencies together, we recommend to use `composer global require --dev soyuka/pmu` (see [soyuka/pmu](github.com/soyuka/pmu)).
182
176
183
-
The last step is to add you feature inside `features/`. You can add your test in one of our existing features, or create your own.
177
+
API Platform is split into several components, components have their own set of tests.
API Platform is split into several components. There are tests for each of these, to run them `cd src/Doctrine/Common` then `composer update` and `./vendor/bin/phpunit`.
188
-
We do not provide a way to run all these tests at once yet.
0 commit comments