Tripal
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Drupal\Tests\tripal\Kernel\ChadoPublishTest Class Reference
Inheritance diagram for Drupal\Tests\tripal\Kernel\ChadoPublishTest:
Inheritance graph
[legend]
Collaboration diagram for Drupal\Tests\tripal\Kernel\ChadoPublishTest:
Collaboration graph
[legend]

Public Member Functions

 testTripalPublishServiceSingleJob ()
 
 testTripalPublishService2Jobs ()
 

Protected Member Functions

 setUp ()
 
 countFieldTable (string $table_name)
 
 getPublicTableRecords (string $table_name, string $key)
 
 getChadoTableRecords (string $table_name, string $key)
 
- Protected Member Functions inherited from Drupal\Tests\tripal_chado\Kernel\ChadoTestKernelBase
 prepareEnvironment (array $functionality)
 

Protected Attributes

 $defaultTheme = 'stark'
 
 $connection
 
 $public
 
 $chado_publish
 
string $mock_warning = ''
 
- Protected Attributes inherited from Drupal\Tests\tripal\Kernel\TripalTestKernelBase
 $messenger = NULL
 
 $logger = NULL
 
 $fileretriever = NULL
 
 $publish_manager = NULL
 

Static Protected Attributes

static $modules = ['system', 'user', 'path', 'path_alias', 'tripal', 'tripal_chado', 'views', 'field']
 
- Static Protected Attributes inherited from Drupal\Tests\tripal_chado\Kernel\ChadoTestKernelBase
static $modules = ['tripal', 'tripal_biodb', 'tripal_chado']
 
- Static Protected Attributes inherited from Drupal\Tests\tripal\Kernel\TripalTestKernelBase
static $modules = ['tripal']
 

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
 

Detailed Description

Tests the publish service for chado-based content types.

@group TripalBackendPublish @group ChadoPublish

Member Function Documentation

◆ countFieldTable()

Drupal\Tests\tripal\Kernel\ChadoPublishTest::countFieldTable ( string  $table_name)
protected

Returns a count of number of entries in a Drupal field table.

Parameters
string$table_nameThe name of the table in the public schema.
Returns
int The count of records in the table.

◆ getChadoTableRecords()

Drupal\Tests\tripal\Kernel\ChadoPublishTest::getChadoTableRecords ( string  $table_name,
string  $key 
)
protected

Returns all the records from a Chado table.

Parameters
string$table_nameThe name of the table in the chado schema.
string$keyThe name of the column for the key of the returned array.
Returns
array An array of record objects from the table, keyed by $key column.

◆ getPublicTableRecords()

Drupal\Tests\tripal\Kernel\ChadoPublishTest::getPublicTableRecords ( string  $table_name,
string  $key 
)
protected

Returns all the records from a Drupal field table.

Parameters
string$table_nameThe name of the table in the public schema.
string$keyThe name of the column for the key of the returned array.
Returns
array An array of record objects from the table, keyed by $key column.

◆ setUp()

Drupal\Tests\tripal\Kernel\ChadoPublishTest::setUp ( )
protected

◆ testTripalPublishService2Jobs()

Drupal\Tests\tripal\Kernel\ChadoPublishTest::testTripalPublishService2Jobs ( )

A very simple test to run TWO publish jobs and check it created entities and populated fields.

See also
https://github.com/tripal/tripal/issues/1716

This test is not ideal but is better than nothing ;-)

We are doing the test here to avoid mocking anything and to test publishing of chado-focused content types.

◆ testTripalPublishServiceSingleJob()

Drupal\Tests\tripal\Kernel\ChadoPublishTest::testTripalPublishServiceSingleJob ( )

A very simple test to run the publish job and check it created entities and populated fields.

This test is not ideal but is better than nothing ;-)

We are doing the test here to avoid mocking anything and to test publishing of chado-focused content types.


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