When running the Acquia Agent tests, I am receiving a fatal error: Call to undefined function _acquia_agent_authenticator(). The reason is that I do not have the Acquia Agent module installed when running the tests, therefore the unit tests don't have access to the _acquia_agent_authenticator() function. This will likely be an issue with the test bot on D.O. According the to the DrupalUnitTestCase::setUp() docblocks:
Unlike DrupalWebTestCase::setUp(), DrupalUnitTestCase::setUp() does not install modules because tests are performed without accessing the database. Any required files must be explicitly included by the child class setUp() method.
Therefore we should explicitly require the acquia_agent.module file in the overridden setUp() method so tests can be run without having to install the module on the testing environment.
Comment | File | Size | Author |
---|---|---|---|
#2 | unit-test-failure-fix-1790424-2.patch | 670 bytes | coltrane |
#1 | unit-test-failure-fix-1790424-1.patch | 648 bytes | cpliakas |
Comments
Comment #1
cpliakas CreditAttribution: cpliakas commentedAttached patch adds the fix.
Comment #2
coltraneCauses the unit test to fail with "The test cannot be executed because it has not been set up properly."
Need to invoke parent::setUp()
Comment #3
cpliakas CreditAttribution: cpliakas commentedWell that was pretty stupid on my part. Patch in #2 fixes the issue.
Comment #4
coltraneCommitted http://drupalcode.org/project/acquia_connector.git/commit/6c9d286