];
} /**
* Tests that oEmbed media types' display can be configured correctly.
*/
public function testDisplayConfiguration() { $account =
$this->
drupalCreateUser(['administer media display'
]);
$this->
drupalLogin($account);
$media_type =
$this->
createMediaType('oembed:video'
);
$this->
drupalGet('/admin/structure/media/manage/' .
$media_type->
id() . '/display'
);
$assert =
$this->
assertSession();
$assert->
statusCodeEquals(200
);
// Test that the formatter doesn't try to check applicability for fields
// which do not have a specific target bundle.
// @see https://www.drupal.org/project/drupal/issues/2976795.
$assert->
pageTextNotContains('Can only flip STRING and INTEGER values!'
);
} /**
* Tests the oEmbed field formatter.
*
* @param string $url
* The canonical URL of the media asset to test.
* @param string $resource_url
* The oEmbed resource URL of the media asset to test.
* @param array $formatter_settings
* Settings for the oEmbed field formatter.
* @param array $selectors
* An array of arrays. Each key is a CSS selector targeting an element in
* the rendered output, and each value is an array of attributes, keyed by
* name, that the element is expected to have.
* @param bool $self_closing
* Indicator if the HTML element is self closing i.e. <p/> vs <p></p>.
*
* @dataProvider providerRender
*/