Commit c58432d
committed
feature #381 [make:*-test] Use the new WebTestAssertionsTrait methods in the generated functional tests (adrienlucas)
This PR was merged into the 1.0-dev branch.
Discussion
----------
[make:*-test] Use the new WebTestAssertionsTrait methods in the generated functional tests
Hi, this PR is to fix the way of calling the assertions static methods of PHPunit in the generated unit and functional tests.
[First commit](8f4af14) : As pointed out in [this article](https://arkadiuszkondas.com/the-right-way-to-call-assertion-in-phpunit/), we should not be calling the assertions using `$this->assert*` but instead with `static::assert*`.
[Second commit](cfb0715) : To go further, we can use [the new assertion API](symfony/symfony#30813) provided by the `WebTestCase`.
I don't kown if this could be considered a BC break... but i hope not.
Commits
-------
5982f3c Use the new api provided by the WebTestAssertionsTraitFile tree
2 files changed
+9
-1
lines changed- src
- Maker
- Resources/skeleton/test
2 files changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
55 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
| 20 | + | |
16 | 21 | | |
17 | 22 | | |
0 commit comments