Add initial simpletests with a base class

Created on 31 May 2016, almost 9 years ago
Updated 29 March 2025, 21 days ago

Hi guys,

I really wish I could have committed all this ages ago... but anyway, better late than never.
This has become particularly important given that we would like to start working and getting a Port to Drupal 8 as soon as possible.
Having at least some tests in place would definitely be a great improvement from one version to the other.

Since we would like very much to start working on the Drupal 8 version of the module, it would be ideal if we could potentially be porting its code with some existing simpletests. On top of that, it would help greatly enforcing module's features for a more efficient maintenance of its code and issue queue.
 

SimpleTest is Drupal's custom testing framework and allows module's code, functionalities and features to be tested automatically from code.

In terms of code organization, as it is suggested at Organizing your test cases, it seems to be recommended to group in a base/utility Test Case class commonly used properties, setup or methods, and other test case classes could extend this common base class.
This would allow breaking into separate test cases the tests.

Test Cases:

  • Configuration of the formatter form through the Manage display pages and corresponding display of its summary.
  • Display of the Image and Link fields through the formatter with all their HTML attributes, such as ALT, TITLE, TARGET, REL, CLASS, for authenticated or anonymous user.
  • Multi-value fields display through the formatter: 2 Images 1 Link, 2 Images 2 Links, 2 Images 3 Links.

 
Although we would be adding more tests, none of these changes or updates would add any new feature or functionnality to the module, however, it would certainly improve its code organization, readability, maintainability as well as its possibility to be further extended in the future.
 
Please let me know if you would have any questions, objections, comments, suggestions, recommendations or concerns on any aspects of feature request, I would be glad to provide more information or explain in more details.
 
Any questions, feedback, testing, changes, ideas or recommendations would be highly appreciated.
Thanks to all in advance.

Feature request
Status

Closed: won't fix

Version

1.0

Component

Automated testing

Created by

🇫🇷France dydave

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇫🇷France dydave

    Outdated issue: This won't get fixed.

    Development and testing has moved to newer core versions and Gitlab CI.

    Closing for now.

Production build 0.71.5 2024