- Status changed to Needs work
almost 2 years ago 2:53pm 1 May 2023 - 🇳🇱Netherlands megachriz
Thanks, @liquidcms
Next steps before the plugin could be added to the module are:
- Config schema for the plugin's settings
- A unit test
- A functional test
- 🇨🇦Canada liquidcms
Sadly, in my 17 years doing Drupal, i have never come across any documentation on how to write tests. But code is there if anyone needs it. :)
- 🇳🇱Netherlands megachriz
@liquidcms
Here is documentation about automated tests in Drupal: https://www.drupal.org/docs/develop/automated-testing →
Here is a tutorial about writing a functional test: https://www.drupal.org/docs/automated-testing/phpunit-in-drupal/phpunit-... →
Each existing Tamper plugin has tests that you can use as an example.But writing tests does require some effort to get into, it takes some time to learn. And even when you have been writing tests for a while, you could experience a test failure you are not sure how to fix. It's like a puzzle. 🙂
So you must be interested in it to make it worth the effort to learn it, I think. - 🇨🇦Canada liquidcms
@MegaChriz, thanks for the links.. and yes, i think the "must be interested in it" is they key in what you said. :) but also having clients that see the value and want to pay for the time to develop tests. Even my government clients don't see value in this (or any form of testing).