[wp-trac] [WordPress Trac] #53010: Tests: introduce namespacing for the test classes
WordPress Trac
noreply at wordpress.org
Mon Jul 26 19:44:14 UTC 2021
#53010: Tests: introduce namespacing for the test classes
------------------------------+-------------------------------------
Reporter: jrf | Owner: hellofromTonya
Type: task (blessed) | Status: assigned
Priority: normal | Milestone: 5.9
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: | Focuses: docs, coding-standards
------------------------------+-------------------------------------
Comment (by jrf):
One thing which isn't addressed yet in the above proposal, but which we
should probably have a think about: what to do with test specific
"fixtures", mocks and doubles ?
What I mean by this, are additional files which may contain a supporting
class or just some text, which are needed for a particular test.
Where should those live in the directory structure ?
If we look at other large projects, there are often three different
structures to be seen:
* One "fixtures" directory at test top-level and sub-directories within
that directory which follow the path to the test which the fixture applies
to.
* One fixtures directory at test top-level and some form of organisation
within, but not necessarily one which follows the test directory
structure. Think: organisation by test groups for instance.
* A fixtures subdirectory within the (sub)directory a test lives in with
the fixtures for the tests in that directory. In practices that would mean
that the fixtures would be close to the tests they apply to and easy to
find, but also that there will be a multitude of fixtures directories.
At this time, I'm not going to propose a direction yet. I'm just posting
this here as a reminder that we need to think about this and should
probably discuss this/take a decision about this before the reorganization
starts.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53010#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list