Active
Project:
Drupal core
Version:
main
Component:
other
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
13 Feb 2018 at 19:30 UTC
Updated:
7 Aug 2024 at 15:48 UTC
Jump to comment: Most recent
#2661542-10: Isolate Drupal\Tests\Component\Plugin\DefaultFactoryTest from core test module brings up a good point. We have a lot of different versions of how to specify a fixtures directory.
$ cd core/
$ find . -iname 'fixture*' -type d
./modules/block/tests/fixtures
./modules/content_moderation/tests/fixtures
./modules/dblog/tests/fixtures
./modules/field/tests/fixtures
./modules/file/tests/fixtures
./modules/hal/tests/fixtures
./modules/media/tests/fixtures
./modules/migrate_drupal/tests/fixtures
./modules/rest/tests/fixtures
./modules/simpletest/tests/fixtures
./modules/system/tests/fixtures
./modules/user/tests/fixtures
./modules/views/tests/fixtures
./tests/Drupal/Tests/Component/Annotation/Fixtures
./tests/Drupal/Tests/Component/DependencyInjection/Fixture
./tests/Drupal/Tests/Component/Diff/Engine/fixtures
./tests/Drupal/Tests/Component/FileCache/Fixtures
./tests/Drupal/Tests/Component/Utility/fixtures
./tests/Drupal/Tests/Core/Config/Entity/Fixtures
./tests/Drupal/Tests/Core/DependencyInjection/Fixture
./tests/Drupal/Tests/Core/DrupalKernel/fixtures
./tests/Drupal/Tests/Core/Form/fixtures
./tests/Drupal/Tests/Core/Plugin/Discovery/Fixtures
./tests/Drupal/Tests/Core/Plugin/Fixtures
./tests/fixtures
So we have some plural, some uppercase.
In modules we seem to have normalized on fixtures/ (lower case, plural).
Other places not so much.
Follow the lead of module tests and use lower-case plural.
Rename test fixture directories in core this way.
Fix tests that need them.
Comments
Comment #12
joachim commentedFurthermore, there are fixtures in multiple places for the same group of tests!
e.g.:
- core/tests/fixtures/plugins
- core/tests/Drupal/Tests/Component/Plugin/Fixtures
and that also probably has fixtures for Core-core, so we have this pair too:
- core/tests/fixtures/plugins
- core/tests/Drupal/Tests/Core/Plugin/Fixtures