Closed (fixed)
Project:
Rabbit Hole
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Mar 2019 at 15:13 UTC
Updated:
23 Jun 2020 at 01:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jonas139 commentedComment #3
jeroentComment #4
jonas139 commentedI've converted the simpletests to BrowserTests for PHPUnit and also fixed some TODO's and deprecated code.
For now I only get 1 deprecated code message about the use of getStatus() instead of getStatusCode() for the BrowserKit Response but this is out of scope for this issue.
Comment #5
rosinegrean commentedComment #6
jeroentComment #7
jonas139 commentedApparently my tests were in the wrong folder (thanks @idebr for pointing out).
Now the patch does have the correct paths.
Comment #8
jonas139 commentedThis one is the correct one...
Comment #9
jeroent.
Comment #10
jeroentGreat work on this @jonas139!
Code looks good and I tried the patch and the tests pass locally.
This is a nice improvement for this module. We should also enable automated testing.
Comment #11
oknateLooks good. A few nits. These two functions are only used once. Perhaps the functions aren't needed. Most tests just create their content types and content in the set up function.
Comment #12
jonas139 commentedI was thinking the same but kept this methods because I wasn't sure this should be covered in this issue.
Comment #13
oknateAh, good point. Perhaps refactoring should be done in a separate issue.
Comment #14
oknateAdding coding standards fixes.
Comment #15
oknateComment #16
jonas139 commentedLooks good to me (thanks :-)).
Comment #17
jonas139 commentedComment #18
jenlamptonI believe that if you add drupal 9 as an option to the
composer.jsonfile in this project you can get a nice little Compatible with Drupal 9 badge in the Project information section on the module page.Below is a code sample from a module that has the badge.
It also looks like it may possible to get the badge by adding the 'core_version_requirement' key in the modules info.yml file, which, in turn, will add the version to the require section of
composer.json. Example follows.Do you want to include this change in the patch here or open a separate issue?
Comment #19
andrewmacpherson commentedTo get the D9 compatibility badge, you just need to put the
core_version_requirement: ^8 || ^9in the module info file. See Disable HTML5 validation module for a simple example; that project doesn't have acomposer.json.In the case of rabbit hole, the
core_version_requirement: ^8 || ^9will need to be added to each submodule.Comment #20
jonas139 commentedI've created a sub issue to make the changes to the compatiblity
Comment #21
berdir> To get the D9 compatibility badge, you just need to put the core_version_requirement: ^8 || ^9 in the module info file
There is no automatic compatibility badge. There's just a free-text field where the maintainers can fill in whatever they want.
Comment #22
lolandese commentedSustaining the RTBC status.
Just providing the terminal output of running PHPUnit on my local machine BEFORE and AFTER applying the #14 patch, showing it works as expected. Impressed by the amount of automated testing going on. Maybe better to show the output as attached text files.
In summary
BEFORE
PHP Fatal error: Uncaught Error: Class 'Drupal\system\Tests\Plugin\PluginTestBase' not found in /var/www/html/brown.localhost/web/modules/contrib/rabbit_hole/src/Tests/RabbitHoleBehaviorPluginTest.php:12:(
AFTER
OK (29 tests, 205 assertions):)
Comment #23
john cook commentedI've checked the patch against upgrade status. There is still an outstanding issue:
Because of this I've set the status back to Needs work, and added the Novice tag to add the
core_version_requirementoption.Comment #24
jeroent@John Cook,
This issue is not about Drupal 9 compatibility. This is converting the simpletests to PHPUnit tests.
Drupal 9 compatibility is handled in this issue: #3091139: Drupal 9 compatibility
Comment #25
jonas139 commentedI agree with @JeroenT, compatibility is covered in issue #3091139: Drupal 9 compatibility
Comment #27
dylan donkersgoed commentedI've merged this in.