Hello!
I’m trying to run the tests locally on branch 5.2, but I’m encountering a lot of errors even without changing the code. For context, I’m running on a MacBook M3 with DDEV. I’ve searched through and read the documentation but I could really use some help.
In the unit tests:
Datetime failure: After some research, I found that a PR already fixed it, but for some reason it’s not working for me.
Multiple errors related to: Error: Call to undefined method Symfony\Bundle\FrameworkBundle\Test\TestContainer::setPublicContainer().
In the e2e-tests, lots of errors similar to this:
5) ContactManagementCest: Batch change owner
Test tests/acceptance/ContactManagementCest.php:batchChangeOwner
Step See "Sales User","//*[@id="app-content"]/div/div[2]/div[2]/div[1]/div[4]/p[1]"
Fail Failed asserting that any element by '//*[@id="app-content"]/div/div[2]/div[2]/div[1]/div[4]/p[1]' on page /s/contacts/view/16
Elements:
+ <p> HenryLCatalano@einrot.com
contains text 'Sales User'
Hi, how did you install or upgrade Mautic? Did you change branch from an older Mautic version? Try to run composer install to also update the dependencies. But it’s hard to advise without steps to replicate.
Hi! I forked the repository, cloned it, and checked out branch 5.2. I followed the instructions from Local Mautic development with DDEV:
ddev config
ddev start
I replaced /.ddev/.env.test.local with the one from the blog post.
ddev exec composer test
After the tests failed, i did
ddev ssh
composer install
and i got these warnings
> Package sensio/framework-extra-bundle is abandoned, you should avoid using it. Use Symfony instead.
> Package theofidry/psysh-bundle is abandoned, you should avoid using it. No replacement was suggested.
Don’t know if it useful to understand where the problem but when i do ddev exec composer test it says
I think I found a fix for issue #12795. I tried running the tests to ensure everything is working. Now, I tried running only the PointBundle tests inside ddev ssh with
The tests cannot connect to the testing database. Double-check that the DB credentials in the .env.test.local are correct. This is ho my config looks like: