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.
In order to be sure that project operates as expected we should cover its functional behavior using tests.
I've started to write them since #2848476: Issues after update to 1.12 and, also, enabled automated testing for the project - https://www.drupal.org/node/2014757/qa.
This topic should be alive until we won't have proper code coverage.
To do
Add tests for#value_callback
Add tests for#process
- Add tests for menu callback -
entityreference_autocomplete/autocomplete/%/%entityreference_autocomplete_bundles/%
- Add tests for
#element_validate
- Create unit test for
entityreference_autocomplete_label_for_reference()
- Create unit test for
entityreference_autocomplete_resolve_entity_label_column()
- Create unit test for
entityreference_autocomplete_explode_tags()
- Create unit test for
entityreference_autocomplete_entity_access()
Comment | File | Size | Author |
---|---|---|---|
#5 | entityreference_autocomplete-tests-2855983-5.patch | 36.78 KB | BR0kEN |
|
Comments
Comment #2
BR0kENComment #4
BR0kENComment #5
BR0kENComment #7
slv_ CreditAttribution: slv_ commentedHi there,
This is great, thanks a lot for all this work @BR0kEN, I feel like I owe you a beer now in Dev Days ;). I'm changing as in need of work as there are some things I'm not quite comfortable with, as they are.
I've rolled back all the changes pushed to master since the 7.x-1.12 release (http://cgit.drupalcode.org/entityreference_autocomplete/commit/?id=d14fd4d), but I pushed them all into a separate branch first (http://cgit.drupalcode.org/entityreference_autocomplete/log/?h=post-1.12), post-1.12.
Then I'll apply just the fix needed for what was broke in 7.x-1.12, in order to get a new release out asap. After that, we can work to incorporate some of the things from post-1.12 into the main branch, but I prefer to do it slowly and without changing certain parts of the module that have been altered in those commits, and that I don't see particularly fitting.
Also, as mentioned in https://www.drupal.org/node/2842655, I'd rather not have anything pushed straight to master, because then it'll be more difficult for me to keep track of it, review, etc. I understand there's a desire to have certain things in stable releases, but there's no rush on having those things. Let's make use of issues for new features or API changes. Aside of actual module changes, I believe most of the testing module and tests will be mostly fine to merge, with some minor changes on the parts that work with the function changes that were applied on the module. In any case, need to review those in more detail, which I'll do after the new stable release is out.
Thanks!