function MediaThumbnailFormatterTest::setUp
Same name and namespace in other branches
- 10 core/modules/media/tests/src/Kernel/MediaThumbnailFormatterTest.php \Drupal\Tests\media\Kernel\MediaThumbnailFormatterTest::setUp()
- 11.x core/modules/media/tests/src/Kernel/MediaThumbnailFormatterTest.php \Drupal\Tests\media\Kernel\MediaThumbnailFormatterTest::setUp()
Overrides MediaKernelTestBase::setUp
File
-
core/
modules/ media/ tests/ src/ Kernel/ MediaThumbnailFormatterTest.php, line 49
Class
- MediaThumbnailFormatterTest
- @coversDefaultClass <a href="/api/drupal/core%21modules%21media%21src%21Plugin%21Field%21FieldFormatter%21MediaThumbnailFormatter.php/class/MediaThumbnailFormatter/9" title="Plugin implementation of the 'media_thumbnail' formatter." class="local">\Drupal\media\Plugin\Field\FieldFormatter\MediaThumbnailFormatter</a> @group media
Namespace
Drupal\Tests\media\KernelCode
protected function setUp() : void {
parent::setUp();
// Create an entity bundle that has a media reference field.
$entity_test_bundle = EntityTestBundle::create([
'id' => $this->testEntityBundleId,
]);
$entity_test_bundle->save();
$this->createEntityReferenceField($this->testEntityTypeId, $this->testEntityBundleId, $this->mediaFieldName, $this->mediaFieldName, 'media');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.