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.
I'm interested in whether anyone thinks this is a good idea?
I have found it useful - its a module which provides a mock api endpoint which can be used to replace a real API endpoint which Drupal needs to talk to during tests.
Expectations can be set for requests to the API and responses can also be set. The tests can then be made to pass or fail depending on if the expectations are met.
Sandbox code here including an example of how to use it within a FeatureContext :-
Comments
Comment #1
johnennew CreditAttribution: johnennew at Deeson commentedComment #2
jhedstromThanks for sharing that code, it seems quite useful!