Experimental project

This is a sandbox project, which contains experimental code for developer use only.

This module wraps the Hamcrest and Mockery PHP testing libraries using the Libraries API.

Requirements

  • The following modules:
  • The following libraries:
    • Hamcrest installed so that composer.json and the library folder, from the ZIP file, are located at sites/[SITE NAME]/libraries/hamcrest/composer.json and sites/[SITE NAME]/libraries/hamcrest/library respectively.
    • Mockery installed so that composer.json and the library folder, from the ZIP file, are located at sites/[SITE NAME]/libraries/mockery/composer.json and sites/[SITE NAME]/libraries/mockery/library respectively.

Complementary Modules

This module was written to complement & extend the Mockery sandbox module for use with Drupal SimpleTest, although this module does not strictly depend on that module. By using the Libraries API, this module frees you from having to use Composer; you will need to download the libraries manually.

If using this module with the Mockery module, you will want to apply the following patches:

Installation and Usage

  1. Install the modules and libraries as described under the Requirements section above.
  2. When crafting SimpleTest test cases, ensure that hammock is one of the modules you enable during the test set-up.
  3. Follow Mockery's Getting Started guide for how to set-up and tear-down mocks.
Supporting organizations: 
Client who commissioned the project for which this module was needed
Developers of the module

Project information