This is a base class for Tripal tests that need a full Drupal install.
It provides helper methods to create various Tripal-focused objects during testing like Tripal content types, Tripal Content, and Tripal Terms.
@group Tripal
Drupal\Tests\tripal\Functional\TripalTestBrowserBase::createTripalContent |
( |
|
$values = [] | ) |
|
Creates a Tripal Entity (i.e. a piece of Tripal content) for testing purposes.
Currently this function creates a real TripalEntity and saves it. Because this is a testing environment, this does get saved in the Drupal prefixed test tables and dropped after the fact.
We went this route intially for maximum code coverage in order to catch all deprication notices posed by Drupal. We may want to replace this approach at a later date.
- Parameters
-
array | $values | These values are passed directly to the create() method. Suggested values are:
- title (string)
- type (string; eg. organism)
- user_id (integer)
- status (boolean; TRUE if published)
|
Drupal\Tests\tripal\Functional\TripalTestBrowserBase::createTripalContentType |
( |
|
$values = [] | ) |
|
Creates a Tripal Entity Type object for testing purposes.
Currently this function creates a real TripalEntityType and saves it. Because this is a testing environment, this does get saved in the Drupal prefixed test tables and dropped after the fact.
We went this route intially for maximum code coverage in order to catch all deprication notices posed by Drupal. We may want to replace this approach at a later date.
- Parameters
-
array | $values | These values are passed directly to the create() method. Suggested values are:
- id (string)
- label (label; string)
- termIdSpace (string)
- termAccession (string)
- help_text (text)
- category (string)
- title_format (string)
- url_format (string)
- hide_empty_field (boolean)
- ajax_field (boolean)
|