Skip to content

SemperIT/MinkCiviCRMHelpers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Mink CiviCRM Helpers

This provides a Drupal 8/9+ module that can be shared among Mink tests that run against CiviCRM. It provides a trait with some helper functions, like assertNoPageErrors() to check if any errors appear on the page or CiviCRM popped up any javascript error boxes on the page.

It also provides a basic starting point for your setUp function which is likely to be common across all tests.

Usage

  1. composer require semperit/minkcivicrmhelpers
  2. Include the following in your test class (inside the class definition not at the top of the file):
    use \Drupal\Tests\mink_civicrm_helpers\Traits\Utils;
  3. Include the following var declaration in the class (this tells the drupal test system what it needs during bootstrap):
    /**
     * @var array
     */
    protected static $modules = [
      'mink_civicrm_helpers',
    ];
  4. Then typically your setUp() functions will look like this, which installs the extension and does some initial basic config:
    public function setUp(): void {
      parent::setUp();
      $this->setUpExtension('_put_your_extension_key_here_');
    }
  5. For further usage see the code comments inside the trait.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages