You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For each adapter, there's a handful of ways to customize the DSN string we generate that is passed to PDO. However, there's not currently a good way we have to test that said behavior is correct / good and so we have some nonsensical tests like:
While we could maybe get what we want out of some level of reflection / mocking around the protected createPdoConnection method, that should be avoided if possible.
Instead, having a getDsn method that returns a string instead would more easily solve the problem, and allow for best practices around unit testing these things, and ensure behavior is good and correct. It's possible that said method could also be useful to someone downstream, but I'm not overly concerned at the moment with that.
The text was updated successfully, but these errors were encountered:
For each adapter, there's a handful of ways to customize the DSN string we generate that is passed to PDO. However, there's not currently a good way we have to test that said behavior is correct / good and so we have some nonsensical tests like:
phinx/tests/Phinx/Db/Adapter/SqlServerAdapterTest.php
Lines 62 to 68 in 48d8e1f
Was unsetting the
port
meaningful? Who knows!While we could maybe get what we want out of some level of reflection / mocking around the protected
createPdoConnection
method, that should be avoided if possible.Instead, having a
getDsn
method that returns a string instead would more easily solve the problem, and allow for best practices around unit testing these things, and ensure behavior is good and correct. It's possible that said method could also be useful to someone downstream, but I'm not overly concerned at the moment with that.The text was updated successfully, but these errors were encountered: