Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
We got 50 test modules inside system module to test various core operation. However this modules written in D7 way and converting them as it is to D8 might not be very efficient.
Proposed resolution
Rewrite the modules so that it can be well unit-tested and stand as a reference modules for contrib module developers to port their modules into D8.
Remaining tasks
1. Need discussion on rewrite.
Modules
- ajax_forms_test
- ajax_test
- batch_test
- bundle_test
- cache_test
- common_test
- common_test_cron_helper
- condition_test
- config_upgrade
- database_test
- design_test
- drupal_system_listing_compatible_test
- drupal_system_listing_incompatible_test
- entity_cache_test
- entity_cache_test_dependency
- entity_crud_hook_test
- entity_test
- error_test
- form_test
- image_test
- menu_test
- module_autoload_test
- module_test
- paramconverter_test
- path_test
- plugin_test
- requirements1_test
- requirements2_test
- router_test
- serialization_test
- session_test
- system_dependencies_test
- system_incompatible_core_version_dependencies_test
- system_incompatible_core_version_test
- system_incompatible_module_version_dependencies_test
- system_incompatible_module_version_test
- system_mail_failure_test
- system_module_test
- system_test
- taxonomy_test
- test_page_test
- theme_page_test
- theme_test
- transliterate_test
- twig_theme_test
- update_script_test
- update_test_1
- update_test_2
- update_test_3
- url_alter_test
User interface changes
Hopefully not.
API changes
N/A
Original report by @dawehner
IRC chat:
[14:03] <dawehner> vijaycs85: hi
[14:03] <dawehner> vijaycs85: even more important: having proper unit tests would make things way faster to test
[14:04] <dawehner> vijaycs85: and the amount of custom test code would be reduced etc.
[14:04] <vijaycs85> dawehner: agreed... however we might need to start it as a meta :)
[14:05] <dawehner> vijaycs85: good point
[14:05] <vijaycs85> dawehner: oh god.. we got 48 MODULES!!!
[14:05] <dawehner> vijaycs85: you know, at the same time a lot of the custom functions should be maybe ported to a proper more d8 like api
[14:06] <dawehner> vijaycs85: so it's maybe hard to crowd-source these tasks?
[14:06] <dawehner> in the sense of: it's hard to describe generically what to do
[14:10] <vijaycs85> dawehner: I guess, this modules are going to be first of its kind and it good as in we will have something to refer in core and bad, it takes time as it is first
[14:11] <vijaycs85> dawehner: however keeping old module and trying to convert every piece of it also sounds not fun - may lead to bad example of D8 module
[14:11] <dawehner> vijaycs85: right
[14:12] <vijaycs85> dawehner: may be we can start a meta and try to see how long we can go? :)
[14:13] <dawehner> yeah, a meta would certainly help
[14:13] <dawehner> vijaycs85: i guess it's also important to set these issues to postponed or something like that, so people don't waste their time
[14:14] <vijaycs85> dawehner: agreed.. I will update them...
[14:18] <dawehner> vijaycs85++
[14:30] <vijaycs85> dawehner: totally 83 defects (out of 148) are test modules :)
[14:30] == Artusamak has changed nick to Artusamak_afk
[14:31] <dawehner> vijaycs85: well test modules are for itself not bad, as they even provide some example code
[14:31] <dawehner> but yeah on the longrun they for sure have to be more like proper d8 code
[14:32] <vijaycs85> dawehner: okay
Comments
Comment #0.0
vijaycs85Updated issue summary.
Comment #0.1
vijaycs85Updated issue summary.
Comment #0.2
vijaycs85Updated issue summary.
Comment #0.3
vijaycs85Updated issue summary.
Comment #0.4
vijaycs85Updated issue summary.
Comment #0.5
vijaycs85Updated issue summary.
Comment #0.6
vijaycs85Updated issue summary.
Comment #0.7
vijaycs85Updated issue summary.
Comment #1
ParisLiakos CreditAttribution: ParisLiakos commentedrelated #1938068: Convert UnitTestBase to PHPUnit
Comment #2
Crell CreditAttribution: Crell commentedUm. What's happening here?
While a lot of test modules ought not to be necessary, any test module that has a hook_menu must be converted! Why were those all closed? They shouldn't be closed. They need to be converted unless someone eliminates them first.
And I don't think we have time to rebuild all of them before we have to rip out the old routing system, which is starting to cause problems.
Comment #3
xjmYeah, while this is a really good idea in general, we cannot and should not block release-blocking conversions on it.
Comment #4
vijaycs85ok, We got the list of page controller & few form builder issues already (We can add missing form callback issues, once done with controllers). We may need to re-open them all and start progress on them.
Comment #5
vijaycs85As per #2, re-opened all test related issue. So closing this issue for now. if we find time to re-write test modules, we can re-visit this.
Comment #5.0
vijaycs85Summary update.