Jump to content

PHPunit with Database


Recommended Posts

Hello all Prestashopers,


I'm trying to create an unit test using PHPunit framework, everything is setup well and working and I could create some simple unit tests, but when it comes to test something related to the cart/customer...etc objects, I get this errors:

PrestaShopException: Link to database cannot be established:SQLSTATE[HY000] [2002] No such file or directory


Even if the database info are there but somehow the PDO object throws this message, any idea please?

e.g the customer fetch:










Thanks in advance, any info I'm ready to collaborate immediately.


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...