-
-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[make:*-test] Use the new WebTestAssertionsTrait methods in the generated functional tests #381
[make:*-test] Use the new WebTestAssertionsTrait methods in the generated functional tests #381
Conversation
Hey @adrienlucas! Thank you for this! So, let's look at the 2 commits independently:
Thanks! |
To go further : should i try to assess Panther installation too, and make the generated test extends the |
For the 1st one, see sebastianbergmann/phpunit#1914 |
cfb0715
to
5982f3c
Compare
@B-Galati thank you ! @weaverryan does the new version of this PR suits more the needs ? should we try to use travis to test against the (i renamed the PR to reflect the new intent) |
Thank you Adrien! |
… 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 WebTestAssertionsTrait
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 : As pointed out in this article, we should not be calling the assertions using
$this->assert*
but instead withstatic::assert*
.Second commit : To go further, we can use the new assertion API provided by the
WebTestCase
.I don't kown if this could be considered a BC break... but i hope not.