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
{{ message }}
This repository was archived by the owner on Apr 12, 2018. It is now read-only.
So I added parent::setUp(); as the first line of my setUp() method, and it's working again.
It would be helpful if the phpunit documentation would make it clear that it is important to call parent::setUp() when overriding the setUp() method, in at least some conditions.
It should probably be mentioned in chapter 4 "Fixtures" where it talks about the setUp() method. Perhaps something like: "If you do override setUp(), don't forget to begin with a call to parent::setUp() if this or that condition applies. Otherwise, this or that thing won't happen anymore, with these undesireable results."
And it should probably also be mentioned somewhere in chapter 8 "Database Testing". Perhaps something like: "If you override setUp() as described in chapter 4, be sure to call parent::setUp(), for this and that reason. Otherwise, this or that other thing won't happen, with these undesireable results.
Of course, if one should always start setUp() with a call to parent::setUp(), a short note to that effect in the appropriate place(s) could save those who don't know or remember to do this some time and frustration.
The text was updated successfully, but these errors were encountered:
Simply replace 6.5 with the version number you are looking for. Simply replace en with fr, pt_br, ja, or zh_cn to access the French, Brazilian Portuguese, Japanese, or Simplified Chinese translation, respectively.
Starting with the documentation for PHPUnit 7.0, the PHPUnit documentation is hosted at https://phpunit.readthedocs.io/.
I am sorry that I have to close this issue here as GitHub does not support moving issues from one project to another. Please open a new ticket for this issue in one of the new issue trackers (see above).
After adding a setUp() method to my database testing class, the database initialization process wasn't happening properly anymore.This seems to be the same problem that was asked and answered here:
http://stackoverflow.com/questions/9490397/dbunit-in-phpunit-is-not-truncating-the-tables
So I added parent::setUp(); as the first line of my setUp() method, and it's working again.
It would be helpful if the phpunit documentation would make it clear that it is important to call parent::setUp() when overriding the setUp() method, in at least some conditions.
It should probably be mentioned in chapter 4 "Fixtures" where it talks about the setUp() method. Perhaps something like: "If you do override setUp(), don't forget to begin with a call to parent::setUp() if this or that condition applies. Otherwise, this or that thing won't happen anymore, with these undesireable results."
And it should probably also be mentioned somewhere in chapter 8 "Database Testing". Perhaps something like: "If you override setUp() as described in chapter 4, be sure to call parent::setUp(), for this and that reason. Otherwise, this or that other thing won't happen, with these undesireable results.
Of course, if one should always start setUp() with a call to parent::setUp(), a short note to that effect in the appropriate place(s) could save those who don't know or remember to do this some time and frustration.
The text was updated successfully, but these errors were encountered: