db-pgsql
db-pgsql copied to clipboard
Add ability to change DB host and port for tests
| Q | A |
|---|---|
| Is bugfix? | ❌ |
| New feature? | ❌ |
| Breaks BC? | ❌ |
| Fixed issues | - |
PR Summary
-
Introduced TestEnvironment class Added a new file
TestEnvironment.phpin thetests/Support/directory, with methods to retrieve PostgreSQL host and port. This centralizes the access to these values. -
Modified CommandTest.php Using the new
TestEnvironmentclass to retrieve PostgreSQL host and port for DSN instantiation and assertions in thetestShowDatabases()method. -
Modified PDODriverTest.php Using the new
TestEnvironmentclass to retrieve PostgreSQL host and port for driver instantiation in thetestConnectionCharset()method. -
Modified TestTrait.php Using the new
TestEnvironmentclass to retrieve PostgreSQL host and port in the methodsgetConnection,getDb, andgetDsn. This refactoring centralizes the way these values are used across multiple methods.
Codecov Report
Patch and project coverage have no change.
Comparison is base (
ada7f05) 99.67% compared to head (5fd76d8) 99.67%.
Additional details and impacted files
@@ Coverage Diff @@
## master #286 +/- ##
=========================================
Coverage 99.67% 99.67%
Complexity 213 213
=========================================
Files 13 13
Lines 617 617
=========================================
Hits 615 615
Misses 2 2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
What is the use case for this change, tests must be run with the default values.
What is the use case for this change?
Usage two container for tests (PHP and DB) in one network. In this case I need change host to actual.
What is the use case for this change?
Usage two container for tests (PHP and DB) in one network. In this case I need change host to actual.
This is not a problem with the package, it is a problem with your configuration.
What is the use case for this change?
Usage two container for tests (PHP and DB) in one network. In this case I need change host to actual.
This is not a problem with the package, it is a problem with your configuration.
It's package problem that deny change host address.
What is the use case for this change?
Usage two container for tests (PHP and DB) in one network. In this case I need change host to actual.
This is not a problem with the package, it is a problem with your configuration.
It's package problem that deny change host address.
Imagine that each user, make a pr to adapt the package to its configuration, for me it should look like this, simple configuration.