protected function GridStackManagerTest::setUp in GridStack 8
Same name and namespace in other branches
- 8.2 tests/src/Kernel/GridStackManagerTest.php \Drupal\Tests\gridstack\Kernel\GridStackManagerTest::setUp()
File
- tests/
src/ Kernel/ GridStackManagerTest.php, line 51
Class
- GridStackManagerTest
- Tests the GridStack manager methods.
Namespace
Drupal\Tests\gridstack\KernelCode
protected function setUp() {
parent::setUp();
$bundle = $this->bundle;
$this->fileSystem = $this->container
->get('file_system');
$this->messenger = $this->container
->get('messenger');
$this->gridstackAdmin = $this->container
->get('gridstack.admin');
$this->blazyAdminFormatter = $this->gridstackAdmin;
$this->gridstackFormatter = $this->container
->get('gridstack.formatter');
$this->gridstackManager = $this->container
->get('gridstack.manager');
$this->gridstackForm = new GridStackForm($this->fileSystem, $this->messenger, $this->blazyAdmin, $this->gridstackManager);
$this->testPluginId = 'gridstack_image';
$this->testFieldName = 'field_gridstack_image';
$this->maxItems = 7;
$this->maxParagraphs = 2;
$settings['fields']['field_text_multiple'] = 'text';
$this
->setUpContentTypeTest($bundle, $settings);
$this
->setUpContentWithItems($bundle);
$this
->setUpRealImage();
$this->display = $this
->setUpFormatterDisplay($bundle);
$this->formatterInstance = $this
->getFormatterInstance();
// Enable Boostrap support.
$this->blazyManager
->getConfigFactory()
->getEditable('gridstack.settings')
->set('framework', 'bootstrap')
->save();
}