You are here

protected function OEmbedTestTrait::getFixturesDirectory in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/media/tests/src/Traits/OEmbedTestTrait.php \Drupal\Tests\media\Traits\OEmbedTestTrait::getFixturesDirectory()
  2. 9 core/modules/media/tests/src/Traits/OEmbedTestTrait.php \Drupal\Tests\media\Traits\OEmbedTestTrait::getFixturesDirectory()

Returns the relative path to the oEmbed fixtures directory.

Return value

string

1 call to OEmbedTestTrait::getFixturesDirectory()
OEmbedFormatterTest::testRender in core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php
Tests the oEmbed field formatter.

File

core/modules/media/tests/src/Traits/OEmbedTestTrait.php, line 19

Class

OEmbedTestTrait
Contains helper functions for testing oEmbed functionality in isolation.

Namespace

Drupal\Tests\media\Traits

Code

protected function getFixturesDirectory() {
  return \Drupal::service('extension.list.module')
    ->getPath('media') . '/tests/fixtures/oembed';
}