Add automated tests

Created on 20 February 2023, almost 2 years ago
Updated 20 March 2023, over 1 year ago

Problem/Motivation

There are currently no automated tests for this module.

Steps to reproduce

Run:

phpunit web/modules/custom/access_by_ref/

No tests executed!

Proposed resolution

Create tests.

Remaining tasks

The main purpose of this issue is to discuss what test cases are required.

I suspect it would make most sense to have a functional test class for each of the four reference types, as the setup will be slightly different for each.

The tests would follow the following general pattern:

  1. Create user A.
  2. Create node owned by user A
  3. Create user B.
  4. Verify that user B cannot edit node.
  5. Set up access by reference conditions required by reference type being tested.
  6. Verify that user B can now edit node.

User interface changes

None.

API changes

None.

Data model changes

None.

Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

🇮🇪Ireland lostcarpark

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.

Production build 0.71.5 2024