Closed (fixed)
Project:
Real Name
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Feb 2020 at 15:26 UTC
Updated:
9 Jun 2021 at 08:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
manuel garcia commentedComment #3
manuel garcia commentedComment #4
manuel garcia commentedI've just realized that an older patch already existed on #3031066: Convert automated tests from Simpletest to PHPUnit - I think this one is more complete as it handles the deprecations as well, in any case, should this patch get committed, I think @idbr should get credited as well https://www.drupal.org/u/idebr
Comment #5
kim.pepperPatch looks good!
Comment #10
philltran commentedThanks Manuel Garcia, kim.pepper and idebr (from earlier issue)
Comment #11
megachriz@philltran
Thanks for taking up maintainership for this module!
It looks like that the tests are not executed by the testbot yet, probably because the test file is still located at src/Tests/RealnameBasicTest.php. I think that the test file needs to be moved to tests/src/Functional/RealnameBasicTest.php (that's what the patch from #2 did).
Comment #12
philltran commented@MegaChriz thanks for catching this.
Comment #13
kwfinken commentedQuick patch to move the RealnameBasicTest.php file to src/Tests/Functional.
Comment #15
philltran commented@kwfinken Thanks for the patch. I also had moved the file on my local but ran into the test failing locally for D9 on the two lines below inside the update user name test.
Looks like your test for D 8.9 passed. Maybe it's just my dev environment.
Comment #16
megachriz@philltran
assertTrue()shouldn't be used for non-boolean values. Based on reading the test, I guess both$realname1and$realname2are a string.The test is still in the wrong folder. Fixed this in attached patch. Leaving to "Needs work" because there are test failures on D9.
Comment #17
megachrizWeird that the patch did not apply. Let's try that again. Now also changed the two
assertTrue()assertions withassertNotEmpty().Comment #18
philltran commented@MegaChriz Thanks! I will try to get this committed today.
Comment #21
megachrizIt looks like that the latest commit introduced syntax errors:
https://www.drupal.org/pift-ci-job/2049005
Comment #23
megachrizI have made the following changes in the test class:
testRealnameUsernameAlter();setUp()so tests are passing on PHP 7.0 as well. (The return value would probably need to be re-added at some point for Drupal 10 support, but PHP 7.0 is still supported for Drupal 8 right now.)Comment #24
megachrizComment #26
megachrizThanks for approving the merge request! Marking this issue as "Fixed".