You are here

protected function EntityEmbedFilterOverridesTest::setUp in Entity Embed 8

Overrides EntityEmbedFilterTestBase::setUp

File

tests/src/Kernel/EntityEmbedFilterOverridesTest.php, line 41

Class

EntityEmbedFilterOverridesTest
Tests that entity embeds can have per-embed overrides for e.g. `alt`.

Namespace

Drupal\Tests\entity_embed\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installSchema('file', [
    'file_usage',
  ]);
  $this
    ->installEntitySchema('file');
  $this
    ->installEntitySchema('media');
  $this
    ->installConfig('image');
  $this
    ->installConfig('media');
  $this
    ->installConfig('system');
  $this->image = File::create([
    'uri' => $this
      ->getTestFiles('image')[0]->uri,
    'uid' => 2,
  ]);
  $this->image
    ->setPermanent();
  $this->image
    ->save();
}