public function OEmbedFormatterTest::testDisplayConfiguration in Drupal 9
Same name and namespace in other branches
- 8 core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php \Drupal\Tests\media\Functional\FieldFormatter\OEmbedFormatterTest::testDisplayConfiguration()
Tests that oEmbed media types' display can be configured correctly.
File
- core/
modules/ media/ tests/ src/ Functional/ FieldFormatter/ OEmbedFormatterTest.php, line 142
Class
Namespace
Drupal\Tests\media\Functional\FieldFormatterCode
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!');
}