protected function SlickTextFormatterTest::setUp in Slick Carousel 8.2
Same name and namespace in other branches
- 8 tests/src/Kernel/SlickTextFormatterTest.php \Drupal\Tests\slick\Kernel\SlickTextFormatterTest::setUp()
File
- tests/
src/ Kernel/ SlickTextFormatterTest.php, line 38
Class
- SlickTextFormatterTest
- Tests the Slick field rendering using the text field type.
Namespace
Drupal\Tests\slick\KernelCode
protected function setUp() {
parent::setUp();
$this
->installConfig(static::$modules);
$this
->installEntitySchema('slick');
$this->testFieldName = 'field_text_multiple';
$this->testEmptyName = 'field_text_multiple_empty';
$this->testFieldType = 'text';
$this->testPluginId = 'slick_text';
$this->maxItems = 7;
$this->maxParagraphs = 2;
$this->slickAdmin = $this->container
->get('slick.admin');
$this->slickManager = $this->container
->get('slick.manager');
$this->slickFormatter = $this->container
->get('slick.formatter');
// Create contents.
$bundle = $this->bundle;
$data = [
'field_name' => $this->testEmptyName,
'field_type' => 'text',
];
$this
->setUpContentTypeTest($bundle, $data);
$this
->setUpContentWithItems($bundle);
$this->display = $this
->setUpFormatterDisplay($bundle);
$data['plugin_id'] = $this->testPluginId;
$this->displayEmpty = $this
->setUpFormatterDisplay($bundle, $data);
$this->formatterInstance = $this
->getFormatterInstance();
}