protected function PanelizerTermFunctionalTest::createTerm in Panelizer 8.4
Same name and namespace in other branches
- 8.5 tests/src/Functional/PanelizerTermFunctionalTest.php \Drupal\Tests\panelizer\Functional\PanelizerTermFunctionalTest::createTerm()
Create a term.
Return value
Term;
1 call to PanelizerTermFunctionalTest::createTerm()
- PanelizerTermFunctionalTest::testPanelizerDefault in tests/
src/ Functional/ PanelizerTermFunctionalTest.php - Tests rendering a taxonomy term with Panelizer default.
File
- tests/
src/ Functional/ PanelizerTermFunctionalTest.php, line 115
Class
- PanelizerTermFunctionalTest
- Basic functional tests of using Panelizer with taxonomy terms.
Namespace
Drupal\Tests\panelizer\FunctionalCode
protected function createTerm() {
$settings = [
'description' => [
[
'value' => $this
->randomMachineName(32),
],
],
'name' => $this
->randomMachineName(8),
'vid' => 'tags',
'uid' => \Drupal::currentUser()
->id(),
];
$term = Term::create($settings);
$term
->save();
return $term;
}