|
Tripal
|


Public Attributes | |
| 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 |
Protected Member Functions | |
| setUp () | |
| prepareEnvironment (array $functionality) | |
Static Protected Attributes | |
| static | $modules = ['tripal', 'tripal_biodb', 'tripal_chado'] |
Static Protected Attributes inherited from Drupal\Tests\tripal\Kernel\TripalTestKernelBase | |
| static | $modules = ['tripal'] |
Additional Inherited Members | |
Protected Attributes inherited from Drupal\Tests\tripal\Kernel\TripalTestKernelBase | |
| $messenger = NULL | |
| $logger = NULL | |
| $fileretriever = NULL | |
| $publish_manager = NULL | |
This is a base class for Chado tests.
It enables Chado tests schemas and helper functions to efficiently perform tests.
Example:
@group Tripal @group Tripal Chado
|
protected |
Prepare kernel environments to support specific functionality.
This method is foccused on making it easier to write kernel test for Tripal functionality. Simply pass in the parts of Tripal core you need in your tests and this method will handle any dependencies to install all the needed schema + config associated with that functionality. Additionally it will try to warn you if your modules array is missing entries with a more user friendly failure then the typical one provided by Drupal.
| array | $functionality | A list of functionality you need to support. Although this method handles dependencies, you should include all items in the supported keys below that you need. This is because in some cases you will want to mock rather then include in your kernel tests and this way, this method supports that. Supported keys are:
|
Reimplemented from Drupal\Tests\tripal\Kernel\TripalTestKernelBase.
|
protected |
{{}}
Reimplemented from Drupal\Tests\tripal\Kernel\TripalTestKernelBase.
Reimplemented in Drupal\Tests\tripal_chado\Kernel\ChadoAutocompleteControllerTest, Drupal\Tests\tripal_chado\Kernel\ChadoOrganismFormElementControllerTest, Drupal\Tests\tripal_chado\Kernel\Entity\TripalEntityChadoFieldTest, Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoBuddy\ChadoBuddyBaseTest, Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoBuddy\ChadoCvtermBuddyTest, Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoBuddy\ChadoDbxrefBuddyTest, Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoBuddy\ChadoPropertyBuddyTest, Drupal\Tests\tripal_chado\Kernel\ChadoField\FieldType\ChadoPropertyTypeCRUDTest, Drupal\Tests\tripal_chado\Kernel\ChadoField\FieldType\ChadoPropertyWidgetFormTest, Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoStorage\ChadoAnalysisDefaultTest, Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoStorage\ChadoContactDefaultTest, Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoStorage\ChadoLinkerPropertyDefaultTest, Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoStorage\ChadoStorageActions_ReadValueTest, Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoStorage\ChadoStorageActions_StoreIdTest, Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoStorage\ChadoStorageActions_StoreLinkTest, Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoStorage\ChadoStorageActions_StorePkeyTest, Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoStorage\ChadoStorageActions_StoreTest, Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoStorage\ChadoStorageDeleteValuesTest, Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoStorage\ChadoStorageFindValuesTest, Drupal\Tests\tripal_chado\Kernel\Plugin\ChadoStorage\ChadoStorageLinkerFieldTest, Drupal\Tests\tripal\Kernel\ChadoPublishTest, Drupal\Tests\tripal_chado\Kernel\Plugin\TripalImporter\ChadoImporterBaseTest, Drupal\Tests\tripal_chado\Kernel\Plugin\TripalImporter\ChadoImporterTransactionTest, Drupal\Tests\tripal_chado\Kernel\Plugin\TripalImporter\ImporterFormTest, Drupal\Tests\tripal_chado\Functional\OboImporterTest, Drupal\Tests\tripal_chado\Kernel\Plugin\TripalVocabTerms\ChadoVocabTermsTest, Drupal\Tests\tripal\Kernel\SyncTripalFieldStorageTest, Drupal\Tests\tripal\Kernel\TripalEntityLookupServiceTest, Drupal\Tests\tripal\Kernel\TripalDBX\ChadoConnectionInheritedTest, Drupal\Tests\tripal\Kernel\TripalDBX\ChadoConnectionTest, and Drupal\Tests\tripal\Kernel\TripalDBX\ChadoSchemaTest.
| const Drupal\Tests\tripal_chado\Kernel\ChadoTestKernelBase::CREATE_SCHEMA = 1 |
Create an empty schema.
| const Drupal\Tests\tripal_chado\Kernel\ChadoTestKernelBase::INIT_CHADO_DUMMY = 4 |
Create a Chado schema and initialize it with dummy data.
| const Drupal\Tests\tripal_chado\Kernel\ChadoTestKernelBase::INIT_CHADO_EMPTY = 3 |
Create a Chado schema with default data.
| const Drupal\Tests\tripal_chado\Kernel\ChadoTestKernelBase::INIT_DUMMY = 2 |
Create a schema and initialize it with dummy data.
| const Drupal\Tests\tripal_chado\Kernel\ChadoTestKernelBase::PREPARE_TEST_CHADO = 5 |
Create a Chado schema and prepare both it and the associated drupal schema.
| const Drupal\Tests\tripal_chado\Kernel\ChadoTestKernelBase::SCHEMA_NAME_ONLY = 0 |
{} Just get a free test schema name.