TripalCultivate / TripalCultivate-Phenotypes

Provides generic support for large scale phenotypic data and traits with importers, content pages and visualizations.
GNU General Public License v3.0
1 stars 0 forks source link

Switch tests to use chado_connection consistently. #102

Closed laceysanderson closed 3 months ago

laceysanderson commented 4 months ago

Motivation

We need to use a consistent variable in tests for the chado connection in order for test traits to work well. I had started to make this change in my setters PR but then realized it would be better on it's own and make my setters PR less confusing.

So here it is.

What does this PR do?

Please describe each things this PR does. For example, a PR may 1) solve a specific bug, 2) create an auomated test to ensure it doesn't return.

  1. Ensure that all tests connecting to chado, have a $chado_connection variable defined consistently with full type hinting.
  2. Ensure that these tests all now correctly use the variable above instead of the original chado or connection variables each one had before.
  3. Add the use statement for ChadoConnection to ensure the type-hinting works properly.
  4. Removes any @file docblocks from testing files I changed since Drupal code standards says not to include them if there is only a single class in the file.

Testing

This PR only changes automated tests so a simple code review and confirming that the tests still pass should be sufficient.

reynoldtan commented 3 months ago

Confirmed automated tests still pass

image

image

image

image

image

image

image

image

image

image

image

image

image