catfan / Medoo

The lightweight PHP database framework to accelerate the development.
https://medoo.in
MIT License
4.83k stars 1.15k forks source link

[TESTS] Constructor should do only initialisation not create PDO connection #674

Closed greensunrise closed 6 years ago

greensunrise commented 6 years ago

This library seriously needs testing and with current structure where so much logic has been put into constructor. It makes it difficult to test it. As of today this library is used in at least 96 382 projects and it's very alarming that it does not even have tests.

catfan commented 6 years ago

We do have a lot of test for each version development with different environment and different database. Each database will have different result. The project, that is, will be in various environment, it's hard to just using PHPUnit for simple testing. And also the fact I admitted that, Medoo right now is still can not 100% compatible for each database.

But we will have a plan to looking for someone professional to join for much more promising and serious complete testing than other projects.

greensunrise commented 6 years ago

For my opinion, there should be unit tests in place. I would actually be interested to write them.