tripal / t4d8

This is a temporary repository for Drupal 9 upgrade for Tripal v4. It is meant to house issues related to the upgrade.
GNU General Public License v2.0
1 stars 10 forks source link

BUG Fix #312: pass schema name instead of connection object. #313

Closed laceysanderson closed 1 year ago

laceysanderson commented 1 year ago

See Issue #312

tl;dr;

We were seeing a LogicException regarding the database connection when prepare tests failed:

PHPUnit\Framework\Exception: PHP Fatal error: Uncaught LogicException: The database connection is not serializable.

It turns out this was only happening if a test failed within the helper function runPrepareStepAssertions(). It was due to passing a connection object as a parameter to the helper function during testing 🙈 Switching to instead pass the schema name and then re-setup the connection fixed the bug.

codeclimate[bot] commented 1 year ago

Code Climate has analyzed commit 5bc42d11 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 34.3% (0.0% change).

View more on Code Climate.

laceysanderson commented 1 year ago

Merging without review since it's a small test-only change.