|
Tripal
|


Public Member Functions | |
| provideTestCases () | |
| testLinkerTableField ($linker_field_name, $linker_table_name, $right_table_id, $extra_values) | |
Protected Member Functions | |
| setUp () | |
Protected Attributes | |
| $fields = [] | |
| $yaml_file = __DIR__ . "/ChadoStorageLinkerFields-FieldDefinitions.yml" | |
| int | $organism_id |
| int | $cvterm_id |
| array | $right_id |
Additional Inherited Members | |
Public Attributes inherited from Drupal\Tests\tripal_chado\Kernel\ChadoTestKernelBase | |
| const | SCHEMA_NAME_ONLY = 0 |
| const | CREATE_SCHEMA = 1 |
| const | INIT_DUMMY = 2 |
| const | INIT_CHADO_EMPTY = 3 |
| const | INIT_CHADO_DUMMY = 4 |
| const | PREPARE_TEST_CHADO = 5 |
Static Protected Attributes inherited from Drupal\Tests\tripal_chado\Kernel\ChadoTestKernelBase | |
| static | $modules = ['tripal', 'tripal_biodb', 'tripal_chado'] |
Tests that ChadoStorage can handle fields for linker tables as we expect. The array of fields/properties used for these tests are designed to match those for a variety of linker tables as examples since the fields are note yet developed. These are the specific cases tested:
Note: testotherfeaturefield is added to ensure we meet the unique constraint on the base table and also to ensure we are testing multi-field functionality.
Note: We do not need to test invalid conditions for createValues() and updateValues() as these are only called after the entity has validated the system using validateValues(). Instead we test all invalid conditions are caught by validateValues().
Specific test cases Test the following for both single and multiple property fields:
@group Tripal @group Tripal Chado @group ChadoStorage @group ChadoStorage Fields
| Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoStorage\ChadoStorageLinkerFieldTest::provideTestCases | ( | ) |
Data Provider: define each test case.
|
protected |
{{}}
Reimplemented from Drupal\Tests\tripal_chado\Kernel\ChadoTestKernelBase.
| Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoStorage\ChadoStorageLinkerFieldTest::testLinkerTableField | ( | $linker_field_name, | |
| $linker_table_name, | |||
| $right_table_id, | |||
| $extra_values | |||
| ) |
Testing ChadoStorage on linker fields.
@dataProvider provideTestCases
Test Cases:
Parameters provided by provideTestCases(). @params $linker_field_name The specific field in $fields to be used for the current test case.
| $linker_table_name | The name of the chado linker table we are testing in the field specified by $linker_field_name |
| $right_table_id | The primary key for the right table in the link. |
| $extra_values | The values for the extra fields specific to each linker table where the key is the property key and the value is the value we should set it to. |