Tripal
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoStorage\ChadoStorageActions_StorePkeyTest Class Reference
Inheritance diagram for Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoStorage\ChadoStorageActions_StorePkeyTest:
Inheritance graph
[legend]
Collaboration diagram for Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoStorage\ChadoStorageActions_StorePkeyTest:
Collaboration graph
[legend]

Public Member Functions

 provideFieldNames ()
 
 testStorePKeyAction ($top_level_key, $field_name)
 

Protected Member Functions

 setUp ()
 

Protected Attributes

 $fields = []
 
 $yaml_file = __DIR__ . "/ChadoStorageActions-FieldDefinitions.yml"
 

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']
 

Detailed Description

Tests that specific ChadoStorage actions perform as expected.

@group Tripal @group Tripal Chado @group ChadoStorage @group ChadoStorage Actions

Member Function Documentation

◆ provideFieldNames()

Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoStorage\ChadoStorageActions_StorePkeyTest::provideFieldNames ( )

DATA PROVIDER: Provide field names.

We essentially want to run the exact same test both when an alias is supplied and when it's not. Thus we are using a data provider to do that without duplicating code.

◆ setUp()

Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoStorage\ChadoStorageActions_StorePkeyTest::setUp ( )
protected

◆ testStorePKeyAction()

Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoStorage\ChadoStorageActions_StorePkeyTest::testStorePKeyAction (   $top_level_key,
  $field_name 
)

Test the store_pkey action.

@dataProvider provideFieldNames

Chado Table: db Columns: db_id*, name*

Specifically, ensure that a property with the store_pkey action

  • and a NULL value can insert a new record
  • has the value set on load
  • does not get changed on update

The documentation for this class was generated from the following file: