Opened 8 years ago
Closed 6 years ago
#37375 closed defect (bug) (fixed)
Several test setUp() methods don't call parent::setUp()
Reported by: | johnbillion | Owned by: | johnbillion |
---|---|---|---|
Milestone: | 5.1 | Priority: | normal |
Severity: | minor | Version: | |
Component: | Build/Test Tools | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
This needs verification and proper testing, but I noticed a bunch of test classes don't call parent::setUp()
within their own setUp()
methods.
Attachments (2)
Change History (10)
#1
@
8 years ago
- Keywords has-patch needs-testing added
- Milestone changed from Awaiting Review to Future Release
#3
@
7 years ago
- Keywords commit added
- Milestone changed from Future Release to 5.0
- Owner set to johnbillion
- Status changed from new to accepted
#4
@
7 years ago
It looks like there are two more:
tests/phpunit/tests/oembed/WpEmbed.php: tests/phpunit/tests/taxonomy/getObjectTaxonomies.php:
I also noticed that in:
tests/phpunit/tests/image/editor.php
a little mismatch in the method's name, i.e. Tests_Image_Editor::setup()
instead of Tests_Image_Editor::setUp()
.
#5
@
7 years ago
37375.2.diff adds the parent::setUp()
call in
Tests_Taxonomy_GetObjectTaxonomies:setUp()
,Tests_WP_Embed:setUp()
.
Also includes the Tests_Image_Editor::setUp()
instead of Tests_Image_Editor::setup()
.
For the two additional parent::setUp()
, I tested:
phpunit --group taxonomy OK (615 tests, 1424 assertions) phpunit --group oembed OK (104 tests, 290 assertions)
#7
@
6 years ago
This is looking good. I just checked the test suite again and appears there are no other functions missed. Good job, @birgire spotting those others.
I opened a PR on GitHub to run the full test suite.
I opened #45931 as a companion ticket for the instances where parent::tearDown()
is not called.
Could not find any issues on local.