protected function AnimatedGifFieldTest::setUp in Animated GIF 8
Overrides AnimatedGifFunctionalTestBase::setUp
File
- tests/
src/ Functional/ AnimatedGifFieldTest.php, line 53
Class
- AnimatedGifFieldTest
- Tests fields styles.
Namespace
Drupal\Tests\animated_gif\FunctionalCode
protected function setUp() : void {
parent::setUp();
$entityType = 'node';
$bundle = 'article';
// Attach file to the node.
$this
->createFileField($entityType, $bundle, $this->fieldName);
// Create the node.
$this->node = $this
->drupalCreateNode([
'type' => $bundle,
]);
$this->node
->save();
$this->displayRepository
->getFormDisplay($entityType, $bundle)
->setComponent($this->fieldName, [
'type' => 'image_image',
])
->save();
}