Enable automated testing for tac_lite. It would be best to at least write a stub test but even if there is not that, enabling testing will test if a site can build with the module.

CommentFileSizeAuthor
#2 tac_lite-tests-3359803-2.patch1.01 KBliam morland

Issue fork tac_lite-3359803

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Liam Morland created an issue. See original summary.

liam morland’s picture

Status: Active » Needs review
StatusFileSize
new1.01 KB

Here is a simple functional test to get started.

liam morland’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
Related issues: +#3359802: Add schema for tac_lite.settings

This merge request enables testing, creates a simple test to get started, and fixes all coding standards issues except #3395316: Use dependency injection. Doing this required also fixing #3359802: Add schema for tac_lite.settings.

damienmckenna’s picture

Status: Needs review » Reviewed & tested by the community

Yes yes!

damienmckenna’s picture

Assigned: Unassigned » damienmckenna
Status: Reviewed & tested by the community » Needs work

Am going to expand upon this and merge in #3359802: Add schema for tac_lite.settings.

damienmckenna’s picture

I'll continue working on this on Monday, I want to add test coverage to confirm the permission system actually locks down the content as expected.

liam morland’s picture

I was thinking this issue would just be about getting testing to run. There can be a follow-up about writing comprehensive tests. If something is running, at least there can be coding standards checks for all changes.

damienmckenna’s picture

While we're waiting for the maintainers to follow up on issues there's no harm on improving what you'd built to both fix the schema and cover usage scenarios. Also, I needed to make sure there was test coverage for this functionality for a work project, so rather than building something custom for our site I'm extending your MR to make the test coverage useful for everyone.

damienmckenna’s picture

Title: Enable testing » Enable testing, add coverage for basic "view" scenario
damienmckenna’s picture

Assigned: damienmckenna » Unassigned
Status: Needs work » Needs review

Now we have some test coverage for the basic module functionality, it can be refined some more if needed.

liam morland’s picture

I made a couple of minor changes. All tests and checks are passing except dependency injection, which is handled in #3395316: Use dependency injection.

damienmckenna’s picture

Thanks Liam.

Maintainers: it would be really helpful if you could commit this, it would open the door for us to add test coverage for other scenarios and issues. Thank you.

damienmckenna’s picture

BTW I split out the setup() method into a separate base class so that I can reuse some of the logic in #3583524: Add support for Paragraphs entities.

damienmckenna’s picture

We'll also need to consider when to replace node_access_rebuild() with the new API: https://www.drupal.org/node/3534610