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