veda-consulting-company / uk.co.vedaconsulting.mailchimp

Other
22 stars 43 forks source link

Tests broken #252

Open xurizaemon opened 7 years ago

xurizaemon commented 7 years ago

As of a33d5a9 the extension tests no longer work for me. The error message is,

PHP Fatal error: require_once(): Failed opening required '/path/to/civicrm.dev/sites/default/files/civicrm/ext/uk.co.vedaconsulting.mailchimp/tests/integration/MailchimpApiIntegrationBase.php' (include_path='/path/to/civicrm.dev/sites/default/files/civicrm/ext/uk.co.vedaconsulting.mailchimp/:.:/path/to/civicrm.dev/sites/all/modules/civicrm/:/path/to/civicrm.dev/sites/all/modules/civicrm//packages:.:/path/to/civicrm.dev/sites/all/modules/civicrm:/path/to/civicrm.dev/sites/all/modules/civicrm/packages:/path/to/civicrm.dev/sites/all/modules/civicrm/vendor/tecnickcom:/path/to/civicrm.dev/sites/all/modules/civicrm/vendor/phpseclib/phpseclib/phpseclib:.:') in /path/to/civicrm.dev/sites/default/files/civicrm/ext/uk.co.vedaconsulting.mailchimp/tests/integration/integration-test-bootstrap.php on line 30

tests/integration/integration-test-bootstrap.php requires __DIR__ . DIRECTORY_SEPARATOR . 'MailchimpApiIntegrationBase.php' but this file has been relocated.

It looks like the merged commit may have been incomplete (guessing maybe it lacks some other file relocations, or a matching change to the test bootstrap).

@deepak-srivastava did the tests pass for you when merging the recent changes?

phpunit 5.5.4, PHP 5.6.21

deepak-srivastava commented 7 years ago

Integration and Unit tests seems to have passed for v2.x. Mock test was failing though but didn't seem to be related to error above.

xurizaemon commented 7 years ago

Since you've just run the tests, would you consider documenting the command to run them, or adding a "Run tests" section to README? (I must have worked it out back then but don't recall now.)

Guessing it's just phpunit path/to/tests and info from README-tech.md required, but when I ran into this, I spent a while being uncertain if it was the tests or my process that was broken.

If you add a quick note here I'm happy to PR some docs improvements.

deepak-srivastava commented 7 years ago

@xurizaemon i used the same approach as this one - https://civicrm.org/blog/totten/developers-extension-testapalooza But agree this should be documented. I'll re-open this ticket as a reminder.