public static function MockData::createTaxonomyTerms in GatherContent 8.5
Same name and namespace in other branches
- 8.4 tests/modules/gathercontent_test/src/MockData.php \Drupal\gathercontent_test\MockData::createTaxonomyTerms()
Create the default test taxonomy terms.
2 calls to MockData::createTaxonomyTerms()
- GcImportTestBase::setUp in tests/
src/ Kernel/ GcImportTestBase.php - GcMigrateTestBase::setUp in tests/
src/ Kernel/ GcMigrateTestBase.php
File
- tests/
modules/ gathercontent_test/ src/ MockData.php, line 44
Class
- MockData
- A class for getting static test data.
Namespace
Drupal\gathercontent_testCode
public static function createTaxonomyTerms() {
$terms = [];
$terms[] = Term::create([
'vid' => 'checkbox_test_taxonomy',
'name' => 'First checkbox',
'gathercontent_option_ids' => [
'op1502871154842',
'op15028711548427481',
],
]);
$terms[] = Term::create([
'vid' => 'checkbox_test_taxonomy',
'name' => 'Second checkbox',
'gathercontent_option_ids' => [
'op1502871154843',
'op15028711548435101',
],
]);
$terms[] = Term::create([
'vid' => 'checkbox_test_taxonomy',
'name' => 'Third checkbox',
'gathercontent_option_ids' => [
'op1502871154844',
'op15028711548447560',
],
]);
$terms[] = Term::create([
'vid' => 'radio_test_taxonomy',
'name' => 'First radio',
'gathercontent_option_ids' => [
'op1502871172350',
'op15028711723507803',
],
]);
$terms[] = Term::create([
'vid' => 'radio_test_taxonomy',
'name' => 'Second radio',
'gathercontent_option_ids' => [
'op1502871172351',
'op1502871172351707',
],
]);
$terms[] = Term::create([
'vid' => 'radio_test_taxonomy',
'name' => 'Third radio',
'gathercontent_option_ids' => [
'op1502871172352',
'op15028711723524246',
],
]);
return $terms;
}