|
Tripal
|


Public Member Functions | |
| testStoreActionAlias () | |
| testStoreActionDeleteIfEmpty () | |
Protected Member Functions | |
| setUp () | |
Protected Attributes | |
| $fields = [] | |
| $yaml_file = __DIR__ . "/ChadoStorageActions-FieldDefinitions.yml" | |
| int | $feature_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 specific ChadoStorage actions perform as expected.
NOTE: The store action is actually tested fairly well as part of the testing for other actions. Specifically, pretty much every action test includes a store property and the value of that property is checked alongside the other properties as a way to confirm that the full record loaded properly. This was especially necessary for the store_* actions since they are set before loading so checking the store property is needed to ensure the record was actually loaded based on the pre-set keys.
Anyway, as such, this class only focuses on testing edge cases like alias use and the delete_if_empty setting.
@group Tripal @group Tripal Chado @group ChadoStorage @group ChadoStorage Actions
|
protected |
{{}}
Reimplemented from Drupal\Tests\tripal_chado\Kernel\ChadoTestKernelBase.
| Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoStorage\ChadoStorageActions_StoreTest::testStoreActionAlias | ( | ) |
Test the store action when an alias is set and it's on a non-base table.
Chado Table: featureprop Columns: featureprop_id*, feature_id*, type_id*, value, rank*
Specifically, ensure that a property with the store action
This is not an easy check since ChadoStorage deletes all these records and recreates them... hense the primary keys are incremented and do not remain constant. print_r($records); $query = $this->chado_connection->select('1:featureprop', 'prop') ->fields('prop', ['rank']) ->condition('prop.featureprop_id', $test_store_other_alias_pkeys[1], '=') ->execute(); $ret_rank = $query->fetchField(); $this->assertEquals(1, $ret_rank, "The rank does not seem to have been updated as we expected.");
| Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoStorage\ChadoStorageActions_StoreTest::testStoreActionDeleteIfEmpty | ( | ) |
Test the store action delete_if_empty on insert and update.
Chado Table: featureprop Columns: featureprop_id*, feature_id*, type_id*, value*, rank*
Specifically, ensure that a property with the store action