1

When I run e2e unit tests, it doesn't seem to recognise that I'm telling it to only use group e2e. This is possibly due to the default include/exclude filters in the phunit.xml file.

When I add the group e2e to the phunit.xml file, I get

CRM_BedResourceManager_BedResourceManagere2eTest exception RuntimeException with message \Civi\Test::e2e() requires a real CMS. Found CIVICRM_UF=UnitTests.

When I hack the tools/scripts/phpunit to contain CIVICRM_UF='Drupal', not 'UnitTets' it then goes on to say

packages/DB/DataObject.php: "No database name / dsn found anywhere",

I tried popping some entries from civicrm_settings in there, but it didn't work.

a) Does anyone have a working e2e unit test config?

b) What are the settings I need to put in my tools/scripts/phpunit to make it work properly? My Civi and Drupes are in the same database.

1

My problem was solved by using the command phpunit4 from inside the extension directory. Use --group e2e or --group headless as needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.