protected function SlickFileFormatterTest::setUp in Slick Carousel 8
File
- tests/
src/ Kernel/ SlickFileFormatterTest.php, line 41
Class
- SlickFileFormatterTest
- 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_file_multiple';
$this->testEmptyName = 'field_file_multiple_empty';
$this->testFieldType = 'image';
$this->testPluginId = 'slick_file';
$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' => 'image',
];
$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();
}